diff --git a/resource/sites/broadcasthe.net/config.json b/resource/sites/broadcasthe.net/config.json index bfe6f62fe..76d7d7e66 100644 --- a/resource/sites/broadcasthe.net/config.json +++ b/resource/sites/broadcasthe.net/config.json @@ -149,10 +149,9 @@ ] }, "snatches": { - "selector": "ul.nobullet > li:contains('Snatched:')", + "selector": "ul.nobullet > li:contains('Snatched:'):last", "filters": [ - "query.text().match(/Snatched: (\\d+)/g)", - "query.reduce((sum, match) => sum + Number(match.split(\": \")[1]), 0)" + "query.text().replace(/,/g,'').match(/[\\d]+/)[0]", "parseInt(query)" ] }, "totalSeedtime": { diff --git a/resource/sites/springsunday.net/config.json b/resource/sites/springsunday.net/config.json index d3046793b..a00b3f297 100644 --- a/resource/sites/springsunday.net/config.json +++ b/resource/sites/springsunday.net/config.json @@ -181,12 +181,23 @@ "filters": ["query.prop('lastChild').nodeValue.trim()"] }, "progress": { - "selector": ["a[id*='subscription'] > img"], - "filters": ["query.is('.uploading') ? 100 : query.is('.downloading') ? query.attr('title').match(/(\\d.+)%/)[1] : null"] + "selector": [".p_seeding", ".p_downloading", ".p_completed", ".p_inactive", ""], + "switchFilters": [ + ["100"], + ["query.prev().attr('style').replace('width: ','').replace('%;','')"], + ["100"], + ["0"], + ["null"] + ] }, "status": { - "selector": ["a[id*='subscription'] > img"], - "filters": ["query.is('.uploading') ? 2 : query.is('.downloading') ? 1: null"] + "selector": [".p_seeding", ".p_downloading", ".p_completed", ".p_inactive"], + "switchFilters": [ + ["2"], + ["1"], + ["255"], + ["3"] + ] } } },