Skip to content

Commit

Permalink
fix engine get all rss
Browse files Browse the repository at this point in the history
  • Loading branch information
shininome committed Oct 26, 2024
1 parent f3768ed commit b8cef20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions backend/src/module/manager/renamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,18 @@ async def rename_file(
file_type=file_type,
season=season,
)
print(ep)
if ep.episode and isinstance(ep.episode, float):
# and isinstance(ep.episode, float) and ep.episode.is_integer():
print("--------------")
ep.episode = int(ep.episode)
return False
# 番剧偏移
ep.episode += bangumi.offset if bangumi else 0

new_path = self.gen_path(ep, bangumi_name, method)
print("start ep")
old_path = file_path
if new_path == old_path:
logging.debug(f"[Renamer] have renamed {old_path}")
return True

logger.debug(f"[Renamer] {old_path=} ->{new_path=}")
result = await client.rename_torrent_file(hash, old_path, new_path)
Expand Down
2 changes: 1 addition & 1 deletion backend/src/module/rss/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def __init__(self, _engine=engine) -> None:
def get_active_rss(self) -> list[RSSItem]:
"""获取所有活跃的rss"""
with Database(self.engine) as database:
rss_items = database.rss.search_all()
rss_items = database.rss.search_active()
return rss_items

async def refresh_rss(
Expand Down

0 comments on commit b8cef20

Please sign in to comment.