This commit is contained in:
jxxghp
2025-01-09 07:59:17 +08:00
parent 293d89510a
commit fb311f3d8a
2 changed files with 13 additions and 3 deletions

View File

@@ -134,10 +134,9 @@ class QbittorrentModule(_ModuleBase, _DownloaderBase[Qbittorrent]):
category=category,
ignore_category_check=False
)
# 获取下载器全局设置
application = server.qbc.application.preferences
# 获取种子内容布局: `Original: 原始, Subfolder: 创建子文件夹, NoSubfolder: 不创建子文件夹`
torrent_layout = application.get("torrent_content_layout", "Original")
torrent_layout = server.get_content_layout()
if not state:
# 读取种子的名称

View File

@@ -448,3 +448,14 @@ class Qbittorrent:
except Exception as err:
logger.error(f"修改tracker出错{str(err)}")
return False
def get_content_layout(self) -> Optional[str]:
"""
获取内容布局
"""
if not self.qbc:
return None
# 获取下载器全局设置
application = self.qbc.application.preferences
# 获取种子内容布局: `Original: 原始, Subfolder: 创建子文件夹, NoSubfolder: 不创建子文件夹`
return application.get("torrent_content_layout", "Original")