mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-28 03:27:31 +08:00
fix(subscribe): handle case when no subscriptions are found
This commit is contained in:
@@ -239,7 +239,8 @@ class SubscribeChain(ChainBase):
|
|||||||
:return: 更新订阅状态为R或删除订阅
|
:return: 更新订阅状态为R或删除订阅
|
||||||
"""
|
"""
|
||||||
if sid:
|
if sid:
|
||||||
subscribes = [self.subscribeoper.get(sid)]
|
subscribe = self.subscribeoper.get(sid)
|
||||||
|
subscribes = [subscribe] if subscribe else []
|
||||||
else:
|
else:
|
||||||
subscribes = self.subscribeoper.list(state)
|
subscribes = self.subscribeoper.list(state)
|
||||||
# 遍历订阅
|
# 遍历订阅
|
||||||
@@ -404,10 +405,13 @@ class SubscribeChain(ChainBase):
|
|||||||
|
|
||||||
# 手动触发时发送系统消息
|
# 手动触发时发送系统消息
|
||||||
if manual:
|
if manual:
|
||||||
if sid:
|
if subscribes:
|
||||||
self.message.put(f'{subscribes[0].name} 搜索完成!', title="订阅搜索", role="system")
|
if sid:
|
||||||
|
self.message.put(f'{subscribes[0].name} 搜索完成!', title="订阅搜索", role="system")
|
||||||
|
else:
|
||||||
|
self.message.put('所有订阅搜索完成!', title="订阅搜索", role="system")
|
||||||
else:
|
else:
|
||||||
self.message.put('所有订阅搜索完成!', title="订阅搜索", role="system")
|
self.message.put('没有找到订阅!', title="订阅搜索", role="system")
|
||||||
|
|
||||||
def update_subscribe_priority(self, subscribe: Subscribe, meta: MetaInfo,
|
def update_subscribe_priority(self, subscribe: Subscribe, meta: MetaInfo,
|
||||||
mediainfo: MediaInfo, downloads: List[Context]):
|
mediainfo: MediaInfo, downloads: List[Context]):
|
||||||
|
|||||||
Reference in New Issue
Block a user