Skip to content

Commit

Permalink
fix(ssd): progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
fzlins committed Jan 8, 2024
1 parent a6c4010 commit bdc2e9b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
5 changes: 2 additions & 3 deletions resource/sites/broadcasthe.net/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
19 changes: 15 additions & 4 deletions resource/sites/springsunday.net/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
]
}
}
},
Expand Down

0 comments on commit bdc2e9b

Please sign in to comment.