From 142daa9d1561c41ab2356dd219c66cc36fa6653f Mon Sep 17 00:00:00 2001 From: lostwindsenril Date: Fri, 29 Aug 2025 13:04:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E9=A6=92=E5=A4=B4=EF=BC=88m-team?= =?UTF-8?q?=EF=BC=89=E6=94=AF=E6=8C=81=E5=89=A9=E4=BD=99=E4=BF=83=E9=94=80?= =?UTF-8?q?=E6=9C=9F=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add freedate to torrent if discountEndTime exists --- app/modules/indexer/spider/mtorrent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/modules/indexer/spider/mtorrent.py b/app/modules/indexer/spider/mtorrent.py index a4bb6ac2..192c9fa7 100644 --- a/app/modules/indexer/spider/mtorrent.py +++ b/app/modules/indexer/spider/mtorrent.py @@ -127,6 +127,8 @@ class MTorrentSpider: 'labels': labels, 'category': category } + if 'discountEndTime' in result.get('status', {}): + torrent['freedate'] = StringUtils.format_timestamp(result.get('status').get('discountEndTime')) torrents.append(torrent) return torrents