Merge pull request #182 from Bluefissure/2.6.0-dev-patch1

[2.6.0-dev] Fix download_path in settings
This commit is contained in:
Estrella Pan
2023-03-15 10:42:06 +08:00
committed by GitHub
3 changed files with 5 additions and 5 deletions

View File

@@ -55,9 +55,9 @@ DEFAULT_SETTINGS = {
ENV_TO_ATTR = {
"program": {
"AB_INTERVAL_TIME": ("sleep_time", lambda e: float(e)),
"AB_RENAME_FREQ": ("times", lambda e: float(e)),
"AB_WEBUI_PORT": ("webui_port", lambda e: int(e)),
"AB_INTERVAL_TIME": ("sleep_time", float),
"AB_RENAME_FREQ": ("times", float),
"AB_WEBUI_PORT": ("webui_port", int),
},
"downloader": {
"AB_DOWNLOADER_HOST": "host",

View File

@@ -35,7 +35,7 @@ class FullSeasonGet:
download_info = {
"url": torrent.torrent_link,
"save_path": os.path.join(
settings.download_path,
settings.downloader.path,
data["official_title"],
f"Season {data['season']}")
}

View File

@@ -45,7 +45,7 @@ class RePath:
path = rules.get(rule).savePath
must_contain = rules.get(rule).mustContain
season, folder_name = self.analyse_path(path)
new_path = PurePath(settings.download_path, folder_name, f"Season {season}").__str__()
new_path = PurePath(settings.downloader.path, folder_name, f"Season {season}").__str__()
all_rule.append(RuleInfo(rule, must_contain, season, folder_name, new_path))
return all_rule