Skip to content

Commit

Permalink
fix: 修复转移失败问题
Browse files Browse the repository at this point in the history
  • Loading branch information
linyuan0213 committed Jul 10, 2024
1 parent 8277985 commit cf44a78
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion app/media/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,16 @@ def get_media_info_on_files(self,
file_media_info = None
# 赋值TMDB信息
if file_media_info:
meta_info = MetaInfo(meta_info.get_name(), tmdb_id=file_media_info.get('id'))
org_begin_episode = meta_info.begin_episode
org_begin_season = meta_info.begin_season
org_string = meta_info.org_string
tmp_string = org_string
if len(org_string) < 10:
org_string = parent_name
meta_info = MetaInfo(org_string, tmdb_id=file_media_info.get('id'))
if len(tmp_string) < 10:
meta_info.begin_episode = org_begin_episode
meta_info.begin_season = org_begin_season
if not meta_info.get_name() or not meta_info.type:
log.warn("【Rmt】%s 未识别出有效信息!" % meta_info.org_string)
return None
Expand Down
2 changes: 1 addition & 1 deletion app/subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ def __get_media_info(self, tmdbid, name, year, mtype, cache=True):
综合返回媒体信息
"""
if tmdbid and not str(tmdbid).startswith("DB:"):
media_info = MetaInfo(title="%s %s".strip() % (name, year))
media_info = MetaInfo(title="%s %s".strip() % (name, year), tmdb_id=tmdbid)
tmdb_info = self.media.get_tmdb_info(mtype=mtype, tmdbid=tmdbid)
media_info.set_tmdb_info(tmdb_info)
else:
Expand Down
2 changes: 1 addition & 1 deletion web/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,7 @@ def subscribe():
# 添加订阅
code = 0
msg = "ok"
meta_info = MetaInfo(title=subject, mtype=media_type)
meta_info = MetaInfo(title=subject, mtype=media_type, tmdb_id=tmdbId)
user_name = req_json.get("request", {}).get("requestedBy_username")
if media_type == MediaType.MOVIE:
code, msg, _ = Subscribe().add_rss_subscribe(mtype=media_type,
Expand Down

0 comments on commit cf44a78

Please sign in to comment.