mirror of
https://github.com/d0zingcat/MoviePilot-Plugins.git
synced 2026-05-13 15:09:12 +00:00
Merge pull request #869 from wumode/imdbsource
This commit is contained in:
@@ -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转换; 支持二级分类和自定义推荐",
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user