From 550c82d181e9f3f29f203e15c4e784f9800bfd35 Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Fri, 3 Jun 2022 20:36:21 +0800 Subject: [PATCH] fix bugs --- AutoBangumi/app/core/download_client.py | 2 +- AutoBangumi/app/core/eps_complete.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/AutoBangumi/app/core/download_client.py b/AutoBangumi/app/core/download_client.py index 690a332b..b388e5aa 100644 --- a/AutoBangumi/app/core/download_client.py +++ b/AutoBangumi/app/core/download_client.py @@ -36,7 +36,7 @@ class DownloadClient: os.path.join( settings.download_path, re.sub(settings.rule_name_re, " ", bangumi_name).strip(), - f"S0{season}", + season, ) ), } diff --git a/AutoBangumi/app/core/eps_complete.py b/AutoBangumi/app/core/eps_complete.py index 57b22930..84a5e5ef 100644 --- a/AutoBangumi/app/core/eps_complete.py +++ b/AutoBangumi/app/core/eps_complete.py @@ -1,4 +1,6 @@ import os.path +import re + import requests from qbittorrentapi import Client from bs4 import BeautifulSoup @@ -35,7 +37,10 @@ class FullSeasonGet: self.client.torrents_add( urls=torrent["url"], save_path=str( - os.path.join(settings.download_path, self.bangumi_name, self.season) + os.path.join( + settings.download_path, + re.sub(settings.rule_name_re, " ", self.bangumi_name), + self.season) ), category="Bangumi", )