fix 自定义订阅插件增加识别按钮
This commit is contained in:
parent
0414854832
commit
1b2f09b95f
@ -65,6 +65,7 @@ class RssSubscribe(_PluginBase):
|
|||||||
_clear: bool = False
|
_clear: bool = False
|
||||||
_clearflag: bool = False
|
_clearflag: bool = False
|
||||||
_action: str = "subscribe"
|
_action: str = "subscribe"
|
||||||
|
_recognization: str = "Y"
|
||||||
_save_path: str = ""
|
_save_path: str = ""
|
||||||
|
|
||||||
def init_plugin(self, config: dict = None):
|
def init_plugin(self, config: dict = None):
|
||||||
@ -89,6 +90,7 @@ class RssSubscribe(_PluginBase):
|
|||||||
self._filter = config.get("filter")
|
self._filter = config.get("filter")
|
||||||
self._clear = config.get("clear")
|
self._clear = config.get("clear")
|
||||||
self._action = config.get("action")
|
self._action = config.get("action")
|
||||||
|
self._recognization = config.get("recognization")
|
||||||
self._save_path = config.get("save_path")
|
self._save_path = config.get("save_path")
|
||||||
|
|
||||||
if self._enabled or self._onlyonce:
|
if self._enabled or self._onlyonce:
|
||||||
@ -219,7 +221,7 @@ class RssSubscribe(_PluginBase):
|
|||||||
'component': 'VCol',
|
'component': 'VCol',
|
||||||
'props': {
|
'props': {
|
||||||
'cols': 12,
|
'cols': 12,
|
||||||
'md': 6
|
'md': 4
|
||||||
},
|
},
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
@ -236,7 +238,7 @@ class RssSubscribe(_PluginBase):
|
|||||||
'component': 'VCol',
|
'component': 'VCol',
|
||||||
'props': {
|
'props': {
|
||||||
'cols': 12,
|
'cols': 12,
|
||||||
'md': 6
|
'md': 4
|
||||||
},
|
},
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
@ -251,6 +253,26 @@ class RssSubscribe(_PluginBase):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'component': 'VCol',
|
||||||
|
'props': {
|
||||||
|
'cols': 12,
|
||||||
|
'md': 4
|
||||||
|
},
|
||||||
|
'content': [
|
||||||
|
{
|
||||||
|
'component': 'VSelect',
|
||||||
|
'props': {
|
||||||
|
'model': 'recognization',
|
||||||
|
'label': '识别',
|
||||||
|
'items': [
|
||||||
|
{'title': '是', 'value': 'Y'},
|
||||||
|
{'title': '否', 'value': 'N'}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -403,6 +425,7 @@ class RssSubscribe(_PluginBase):
|
|||||||
"clear": False,
|
"clear": False,
|
||||||
"filter": False,
|
"filter": False,
|
||||||
"action": "subscribe",
|
"action": "subscribe",
|
||||||
|
"recognization": "Y",
|
||||||
"save_path": ""
|
"save_path": ""
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -525,7 +548,9 @@ class RssSubscribe(_PluginBase):
|
|||||||
"include": self._include,
|
"include": self._include,
|
||||||
"exclude": self._exclude,
|
"exclude": self._exclude,
|
||||||
"proxy": self._proxy,
|
"proxy": self._proxy,
|
||||||
"clear": self._clear
|
"clear": self._clear,
|
||||||
|
"action": self._action,
|
||||||
|
"recognization": self._recognization,
|
||||||
})
|
})
|
||||||
|
|
||||||
def check(self):
|
def check(self):
|
||||||
@ -605,17 +630,18 @@ class RssSubscribe(_PluginBase):
|
|||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
if self._action == "download":
|
if self._action == "download":
|
||||||
if mediainfo.type == MediaType.TV:
|
if str(self._recognization) == "Y":
|
||||||
if no_exists:
|
if mediainfo.type == MediaType.TV:
|
||||||
exist_info = no_exists.get(mediainfo.tmdb_id)
|
if no_exists:
|
||||||
season_info = exist_info.get(meta.begin_season or 1)
|
exist_info = no_exists.get(mediainfo.tmdb_id)
|
||||||
if not season_info:
|
season_info = exist_info.get(meta.begin_season or 1)
|
||||||
logger.info(f'{mediainfo.title_year} {meta.season} 己存在')
|
if not season_info:
|
||||||
continue
|
logger.info(f'{mediainfo.title_year} {meta.season} 己存在')
|
||||||
if (season_info.episodes
|
continue
|
||||||
and not set(meta.episode_list).issubset(set(season_info.episodes))):
|
if (season_info.episodes
|
||||||
logger.info(f'{mediainfo.title_year} {meta.season_episode} 己存在')
|
and not set(meta.episode_list).issubset(set(season_info.episodes))):
|
||||||
continue
|
logger.info(f'{mediainfo.title_year} {meta.season_episode} 己存在')
|
||||||
|
continue
|
||||||
# 添加下载
|
# 添加下载
|
||||||
result = self.downloadchain.download_single(
|
result = self.downloadchain.download_single(
|
||||||
context=Context(
|
context=Context(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user