From c8c671d915b2cd02a5f24763a01541c6f284d141 Mon Sep 17 00:00:00 2001 From: lostwindsenril Date: Fri, 29 Aug 2025 13:07:31 +0800 Subject: [PATCH] Update app/modules/indexer/spider/mtorrent.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- app/modules/indexer/spider/mtorrent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/modules/indexer/spider/mtorrent.py b/app/modules/indexer/spider/mtorrent.py index 192c9fa7..d5f9403d 100644 --- a/app/modules/indexer/spider/mtorrent.py +++ b/app/modules/indexer/spider/mtorrent.py @@ -127,8 +127,8 @@ class MTorrentSpider: 'labels': labels, 'category': category } - if 'discountEndTime' in result.get('status', {}): - torrent['freedate'] = StringUtils.format_timestamp(result.get('status').get('discountEndTime')) + if discount_end_time := (result.get('status') or {}).get('discountEndTime'): + torrent['freedate'] = StringUtils.format_timestamp(discount_end_time) torrents.append(torrent) return torrents