Skip to content

Commit

Permalink
fix: ESearchResultParseStatus.noTorrents message
Browse files Browse the repository at this point in the history
  • Loading branch information
fzlins committed Jan 15, 2024
1 parent c32aaca commit 6fbd845
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
17 changes: 11 additions & 6 deletions resource/sites/broadcasthe.net/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,6 @@
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
]
},
"snatches": {
"selector": "ul.nobullet > li:contains('Snatched:'):last",
"filters": [
"query.text().replace(/,/g,'').match(/[\\d]+/)[0]", "parseInt(query)"
]
},
"totalSeedtime": {
"selector": "ul.nobullet > li:contains('Total Time Seeded:')",
"filters": [
Expand Down Expand Up @@ -211,6 +205,17 @@
"filters": ["jQuery.map(query, item=>$(item).attr('href').match(/torrentid=(\\d+)/)[1])"]
}
}
},
"levelExtendInfo": {
"page": "/user.php?action=next_class",
"fields": {
"snatches": {
"selector": "td:contains('Minimum snatches') + td + td",
"filters": [
"query.text().replace(/,/g,'').match(/[\\d]+/)[0]", "parseInt(query)"
]
}
}
}
}
}
15 changes: 13 additions & 2 deletions src/background/searcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,19 @@ export class Searcher {
searchEntryConfigQueryString = searchEntryConfigQueryString.replace("$name$", seriesName);
else
{
resolve(result);
return;
resolve({
status: 'success',
success: true,
msg: this.getErrorMessage(
site,
ESearchResultParseStatus.noTorrents,
""
),
data: {
},
type: EDataResultType.success
});
return true;
}
break;
default:
Expand Down

0 comments on commit 6fbd845

Please sign in to comment.