From 6578444b26a9364d05f81ffb469c19a8ac3f0fdf Mon Sep 17 00:00:00 2001 From: xlongshu Date: Wed, 2 Aug 2023 22:55:45 +0800 Subject: [PATCH] fix: DiscFan seedingSize --- resource/sites/discfan.net/config.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/resource/sites/discfan.net/config.json b/resource/sites/discfan.net/config.json index b155925fa..15d2c5ace 100644 --- a/resource/sites/discfan.net/config.json +++ b/resource/sites/discfan.net/config.json @@ -110,5 +110,24 @@ }], "supportedFeatures": { "imdbSearch": false + }, + "selectors": { + "userSeedingTorrents": { + "page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding", + "fields": { + "seeding": { + "selector": ["div b:first"], + "filters": ["query.text()"] + }, + "seedingSize": { + "selector": "div div:first", + "filters": [ + "query.text().match(/總大小:(.*?)B/g)", + "(query && query.length>0) ? query[0].replace('總大小:', '').trim() : 0", + "(query != 0) ? query.sizeToNumber() : 0" + ] + } + } + } } } \ No newline at end of file