自定义订阅兼容V2

This commit is contained in:
jxxghp
2024-10-19 17:21:26 +08:00
parent 5297a76eb1
commit aa3a4f7ec9
2 changed files with 17 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
{
"SiteStatistic": {
"SiteStatistic": {
"name": "站点数据统计",
"description": "站点统计数据图表。",
"labels": "站点,仪表板",
@@ -97,5 +97,17 @@
"v1.7": "MoviePilot V2 版本自动转移做种插件",
"v1.7.1": "修复兼容性问题"
}
},
"RssSubscribe": {
"name": "自定义订阅",
"description": "定时刷新RSS报文识别内容后添加订阅或直接下载。",
"labels": "订阅",
"version": "2.0",
"icon": "rss.png",
"author": "jxxghp",
"level": 2,
"history": {
"v2.0": "兼容MoviePilot V2 版本"
}
}
}

View File

@@ -33,7 +33,7 @@ class RssSubscribe(_PluginBase):
# 插件图标
plugin_icon = "rss.png"
# 插件版本
plugin_version = "1.5"
plugin_version = "2.0"
# 插件作者
plugin_author = "jxxghp"
# 作者主页
@@ -409,7 +409,7 @@ class RssSubscribe(_PluginBase):
'component': 'VSwitch',
'props': {
'model': 'filter',
'label': '使用过滤规则',
'label': '使用订阅优先级规则',
}
}
]
@@ -628,7 +628,7 @@ class RssSubscribe(_PluginBase):
logger.error(f"未获取到RSS数据{url}")
return
# 过滤规则
filter_rule = self.systemconfig.get(SystemConfigKey.SubscribeFilterRules)
filter_groups = self.systemconfig.get(SystemConfigKey.SubscribeFilterRuleGroups)
# 解析数据
for result in results:
try:
@@ -680,7 +680,7 @@ class RssSubscribe(_PluginBase):
# 过滤种子
if self._filter:
result = self.chain.filter_torrents(
rule_string=filter_rule,
rule_groups=filter_groups,
torrent_list=[torrentinfo],
mediainfo=mediainfo
)