mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-02-02 17:59:27 +08:00
fix: 番剧收集无法进入数据库的问题。
This commit is contained in:
9
.gitignore
vendored
9
.gitignore
vendored
@@ -182,7 +182,6 @@ test.*
|
||||
|
||||
# webui
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
@@ -202,8 +201,6 @@ dev-dist
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
@@ -211,5 +208,11 @@ dev-dist
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
|
||||
# vitepress
|
||||
/docs/.vitepress/cache/
|
||||
|
||||
|
||||
# test file
|
||||
test.*
|
||||
test_*
|
||||
@@ -20,6 +20,7 @@ RUN set -ex && \
|
||||
su-exec \
|
||||
shadow \
|
||||
tini \
|
||||
openssl \
|
||||
tzdata && \
|
||||
python3 -m pip install --no-cache-dir --upgrade pip && \
|
||||
sed -i '/bcrypt/d' requirements.txt && \
|
||||
|
||||
@@ -13,7 +13,7 @@ class SeasonCollector(DownloadClient):
|
||||
logger.info(
|
||||
f"Start collecting {bangumi.official_title} Season {bangumi.season}..."
|
||||
)
|
||||
with SearchTorrent() as st:
|
||||
with SearchTorrent() as st, RSSEngine() as engine:
|
||||
if not link:
|
||||
torrents = st.search_season(bangumi)
|
||||
else:
|
||||
@@ -23,9 +23,9 @@ class SeasonCollector(DownloadClient):
|
||||
f"Collections of {bangumi.official_title} Season {bangumi.season} completed."
|
||||
)
|
||||
bangumi.eps_collect = True
|
||||
with RSSEngine() as engine:
|
||||
engine.bangumi.update(bangumi)
|
||||
engine.torrent.add_all(torrents)
|
||||
if engine.bangumi.update(bangumi):
|
||||
engine.bangumi.add(bangumi)
|
||||
engine.torrent.add_all(torrents)
|
||||
return ResponseModel(
|
||||
status=True,
|
||||
status_code=200,
|
||||
@@ -34,13 +34,13 @@ class SeasonCollector(DownloadClient):
|
||||
)
|
||||
else:
|
||||
logger.warning(
|
||||
f"Collection of {bangumi.official_title} Season {bangumi.season} failed."
|
||||
f"Already collected {bangumi.official_title} Season {bangumi.season}."
|
||||
)
|
||||
return ResponseModel(
|
||||
status=False,
|
||||
status_code=406,
|
||||
msg_en=f"Collection of {bangumi.official_title} Season {bangumi.season} failed.",
|
||||
msg_zh=f"收集 {bangumi.official_title} 第 {bangumi.season} 季失败。",
|
||||
msg_zh=f"收集 {bangumi.official_title} 第 {bangumi.season} 季失败, 种子已经添加。",
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user