fix: many bugs

This commit is contained in:
EstrellaXD
2023-06-01 09:51:07 +08:00
parent 3e850c7b43
commit efd637182e
5 changed files with 6 additions and 9 deletions

View File

@@ -35,7 +35,7 @@ RUN apk add --no-cache \
sed -i '/bcrypt/d' requirements.txt && \
pip install --no-cache-dir -r requirements.txt && \
# Download WebUI
curl -sL "https://github.com/Rewrite0/Auto_Bangumi_WebUI/releases/download/v2.0.0-beta1/dist.zip" | busybox unzip -q -d /app - && \
curl -sL "https://github.com/Rewrite0/Auto_Bangumi_WebUI/releases/latest/download/dist.zip" | busybox unzip -q -d /app - && \
mv /app/dist /app/templates && \
# Add user
addgroup -S ab -g 911 && \

View File

@@ -1,4 +1,5 @@
import threading
import time
from .status import ProgramStatus
@@ -64,6 +65,7 @@ class RenameThread(ProgramStatus):
with PostNotification() as notifier:
for info in renamed_info:
notifier.send_msg(info)
time.sleep(2)
self.stop_event.wait(settings.program.rename_time)
def rename_start(self):

View File

@@ -28,9 +28,9 @@ class SeasonCollector(DownloadClient):
logger.info("Completed!")
def subscribe_season(self, data: BangumiData):
data.added = True
data.eps_collect = True
with BangumiDatabase() as db:
data.added = True
data.eps_collect = True
db.insert(data)
self.add_rss_feed(data.rss_link[0], item_path=data.official_title)
self.set_rule(data)

View File

@@ -12,7 +12,7 @@ class TorrentManager(BangumiDatabase):
@staticmethod
def __match_torrents_list(data: BangumiData) -> list:
with DownloadClient() as client:
torrents = client.get_torrent_info()
torrents = client.get_torrent_info(status_filter=None)
return [torrent.hash for torrent in torrents if torrent.save_path == data.save_path]
def delete_torrents(self, data: BangumiData, client: DownloadClient):

View File

@@ -1,5 +0,0 @@
from module.database import BangumiDatabase
from module.downloader import DownloadClient