Skip to content

Commit

Permalink
fix: collect api bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
EstrellaXD committed Aug 29, 2023
1 parent 89cc0b8 commit e5af3d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions backend/src/module/api/rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async def download_collection(data: Bangumi, current_user=Depends(get_current_us
if not current_user:
raise UNAUTHORIZED
with SeasonCollector() as collector:
resp = collector.collect_season(data, data.rss_link[0])
resp = collector.collect_season(data, data.rss_link)
return u_response(resp)


Expand All @@ -145,4 +145,5 @@ async def subscribe(data: Bangumi, current_user=Depends(get_current_user)):
raise UNAUTHORIZED
with SeasonCollector() as collector:
resp = collector.subscribe_season(data)
return u_response(resp)
return u_response(resp)

2 changes: 1 addition & 1 deletion backend/src/module/manager/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def collect_season(self, bangumi: Bangumi, link: str = None):
if not link:
torrents = st.search_season(bangumi)
else:
torrents = st.get_torrents(link, _filter="|".join(bangumi.filter))
torrents = st.get_torrents(link, bangumi.filter.replace(",", "|"))
if self.add_torrent(torrents, bangumi):
logger.info(f"Collections of {bangumi.official_title} Season {bangumi.season} completed.")
bangumi.eps_collect = True
Expand Down
2 changes: 1 addition & 1 deletion webui/src/api/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const apiDownload = {
rss_link: bangumiData.rss_link.join(','),
}
const { data } = await axios.post<ApiSuccess>(
'api/v1/rss/collection',
'api/v1/rss/collect',
postData
);
return data;
Expand Down

0 comments on commit e5af3d9

Please sign in to comment.