diff --git a/app/media/media.py b/app/media/media.py index 69f77a90..4614d33a 100644 --- a/app/media/media.py +++ b/app/media/media.py @@ -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 diff --git a/app/subscribe.py b/app/subscribe.py index 26120e00..b6718198 100644 --- a/app/subscribe.py +++ b/app/subscribe.py @@ -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: diff --git a/web/main.py b/web/main.py index 6e0d37e3..42f60f98 100644 --- a/web/main.py +++ b/web/main.py @@ -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,