From 87a524d5a4a8e0aa183f0fc69d94f4728f65b0a5 Mon Sep 17 00:00:00 2001 From: wumode Date: Wed, 6 Aug 2025 16:05:43 +0800 Subject: [PATCH] =?UTF-8?q?update(ImdbSource)=20=E6=94=B9=E8=BF=9B?= =?UTF-8?q?=E5=AA=92=E4=BD=93=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.v2.json | 3 ++- plugins.v2/imdbsource/__init__.py | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package.v2.json b/package.v2.json index 283a61f..224e363 100644 --- a/package.v2.json +++ b/package.v2.json @@ -436,11 +436,12 @@ "name": "IMDb源", "description": "让探索,推荐和媒体识别支持IMDb数据源。", "labels": "探索", - "version": "1.5.3", + "version": "1.5.4", "icon": "IMDb_IOS-OSX_App.png", "author": "wumode", "level": 1, "history": { + "v1.5.4": "改进媒体识别", "v1.5.3": "异步执行; 修复 bugs (主程序版本需要高于 2.6.8)", "v1.5.2": "修复一些bugs", "v1.5.1": "改进媒体id转换; 支持二级分类和自定义推荐", diff --git a/plugins.v2/imdbsource/__init__.py b/plugins.v2/imdbsource/__init__.py index afa6584..f3ed83d 100644 --- a/plugins.v2/imdbsource/__init__.py +++ b/plugins.v2/imdbsource/__init__.py @@ -29,7 +29,7 @@ class ImdbSource(_PluginBase): # 插件图标 plugin_icon = "IMDb_IOS-OSX_App.png" # 插件版本 - plugin_version = "1.5.3" + plugin_version = "1.5.4" # 插件作者 plugin_author = "wumode" # 作者主页 @@ -1788,6 +1788,8 @@ class ImdbSource(_PluginBase): """ if not self._enabled: return None + if kwargs.get('tmdbid') or kwargs.get('doubanid') or kwargs.get('bangumiid'): + return None if not meta: return None elif not meta.name: @@ -1848,6 +1850,9 @@ class ImdbSource(_PluginBase): """ if not self._enabled: return None + # when external id exists + if kwargs.get('tmdbid') or kwargs.get('doubanid') or kwargs.get('bangumiid'): + return None if not meta: return None elif not meta.name: @@ -1960,7 +1965,7 @@ class ImdbSource(_PluginBase): None: ['tv', 'movie'] } allowed_types = type_map.get(media_info.type, ['tv', 'movie']) - filtered = [res for res in all_results if res.get('type') in allowed_types] + filtered = [res for res in all_results if res.get('media_type') in allowed_types] # 定义一个过滤链:每次过滤后如果只剩一个结果就返回 def filter_and_return(results, predicate):