fix 自定义订阅插件增加识别按钮

This commit is contained in:
thsrite 2023-09-12 12:45:39 +08:00
parent 0414854832
commit 1b2f09b95f

View File

@ -65,6 +65,7 @@ class RssSubscribe(_PluginBase):
_clear: bool = False
_clearflag: bool = False
_action: str = "subscribe"
_recognization: str = "Y"
_save_path: str = ""
def init_plugin(self, config: dict = None):
@ -89,6 +90,7 @@ class RssSubscribe(_PluginBase):
self._filter = config.get("filter")
self._clear = config.get("clear")
self._action = config.get("action")
self._recognization = config.get("recognization")
self._save_path = config.get("save_path")
if self._enabled or self._onlyonce:
@ -219,7 +221,7 @@ class RssSubscribe(_PluginBase):
'component': 'VCol',
'props': {
'cols': 12,
'md': 6
'md': 4
},
'content': [
{
@ -236,7 +238,7 @@ class RssSubscribe(_PluginBase):
'component': 'VCol',
'props': {
'cols': 12,
'md': 6
'md': 4
},
'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,
"filter": False,
"action": "subscribe",
"recognization": "Y",
"save_path": ""
}
@ -525,7 +548,9 @@ class RssSubscribe(_PluginBase):
"include": self._include,
"exclude": self._exclude,
"proxy": self._proxy,
"clear": self._clear
"clear": self._clear,
"action": self._action,
"recognization": self._recognization,
})
def check(self):
@ -605,6 +630,7 @@ class RssSubscribe(_PluginBase):
continue
else:
if self._action == "download":
if str(self._recognization) == "Y":
if mediainfo.type == MediaType.TV:
if no_exists:
exist_info = no_exists.get(mediainfo.tmdb_id)