fix 缺失状态识判

This commit is contained in:
jxxghp
2023-11-13 12:00:53 +08:00
parent 3b99fb5c96
commit 612271bf0c
4 changed files with 45 additions and 31 deletions

View File

@ -1,4 +1,3 @@
import copy
from typing import Any
from app.chain.download import *
@ -110,9 +109,10 @@ class MessageChain(ChainBase):
# 发送缺失的媒体信息
if no_exists:
# 发送消息
mediakey = mediainfo.tmdb_id or mediainfo.douban_id
messages = [
f"{sea} 季缺失 {StringUtils.str_series(no_exist.episodes) if no_exist.episodes else no_exist.total_episode}"
for sea, no_exist in no_exists.get(mediainfo.tmdb_id).items()]
for sea, no_exist in no_exists.get(mediakey).items()]
self.post_message(Notification(channel=channel,
title=f"{mediainfo.title_year}\n" + "\n".join(messages),
userid=userid))