From 56eba6b6c4b0a330116cf4aa330343dabd4552d7 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Thu, 8 Jun 2023 17:36:16 +0800 Subject: [PATCH] fix bugs --- app/chain/common.py | 2 +- app/modules/telegram/telegram.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/chain/common.py b/app/chain/common.py index a17b748a..f025d4c6 100644 --- a/app/chain/common.py +++ b/app/chain/common.py @@ -216,7 +216,7 @@ class CommonChain(ChainBase): torrent_episodes = self.torrent.get_torrent_episodes(torrent_files) if not torrent_episodes \ or len(torrent_episodes) >= __get_season_episodes(need_tmdbid, item_season[0]): - _, download_id = __download(_context=context, _torrent_file=torrent_path) + download_id = __download(_context=context, _torrent_file=torrent_path) else: logger.info( f"【Downloader】种子 {meta.org_string} 未含集数信息,解析文件数为 {len(torrent_episodes)}") diff --git a/app/modules/telegram/telegram.py b/app/modules/telegram/telegram.py index 895a21e9..9a71da32 100644 --- a/app/modules/telegram/telegram.py +++ b/app/modules/telegram/telegram.py @@ -167,6 +167,8 @@ class Telegram(metaclass=Singleton): # 发送图文消息 if image: + # 转换TMDB图片质量 + image = image.replace("original", "w500") res = request.get_res("https://api.telegram.org/bot%s/sendPhoto?" % self._telegram_token + urlencode( {"chat_id": chat_id, "photo": image, "caption": caption, "parse_mode": "Markdown"})) if __res_parse(res):