Skip to content

Commit

Permalink
fix: many bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
EstrellaXD committed Jun 1, 2023
1 parent 3e850c7 commit efd6371
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
2 changes: 2 additions & 0 deletions src/module/core/sub_thread.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import threading
import time

from .status import ProgramStatus

Expand Down Expand Up @@ -64,6 +65,7 @@ def rename_loop(self):
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):
Expand Down
4 changes: 2 additions & 2 deletions src/module/manager/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def collect_season(self, data: BangumiData, link: str = None):
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)
Expand Down
2 changes: 1 addition & 1 deletion src/module/manager/torrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
5 changes: 0 additions & 5 deletions src/module/rss/add_rules.py

This file was deleted.

0 comments on commit efd6371

Please sign in to comment.