From 62dcfd7a7eca9560f888d39ec4905d20e95ed31c Mon Sep 17 00:00:00 2001 From: Aiden <9078877+aiden0w0@users.noreply.github.com> Date: Wed, 4 Oct 2023 19:17:22 -0500 Subject: [PATCH] fix(freefarm): name, desc, progression and status --- resource/sites/pt.0ff.cc/config.json | 29 +++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/resource/sites/pt.0ff.cc/config.json b/resource/sites/pt.0ff.cc/config.json index a6b47b7b1..e542ea4eb 100644 --- a/resource/sites/pt.0ff.cc/config.json +++ b/resource/sites/pt.0ff.cc/config.json @@ -1,7 +1,7 @@ { - "name": "Farm", + "name": "FreeFarm", "timezoneOffset": "+0800", - "description": "Farm", + "description": "自由农场 FreeFarm", "url": "https://pt.0ff.cc/", "icon": "https://pt.0ff.cc/favicon.ico", "tags": [], @@ -82,6 +82,29 @@ } ], "collaborator": "koal", + "selectors": { + "userSeedingTorrents": { + "page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding", + "fields": { + "seeding": { + "selector": [ + "b:first" + ], + "filters": [ + "query.text()" + ] + }, + "seedingSize": { + "selector": "", + "filters": [ + "query.text().match(/总大小:(.*?)上一页/g)", + "(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0", + "(query != 0) ? query.sizeToNumber() : 0" + ] + } + } + } + }, "selectors": { "userSeedingTorrents": { "page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding", @@ -105,4 +128,4 @@ } } } -} \ No newline at end of file +}