Skip to content

Commit

Permalink
No need to parse torrents when searching for only new titles
Browse files Browse the repository at this point in the history
  • Loading branch information
Morea committed Sep 30, 2023
1 parent 7d7eb4a commit 1df9bd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Find Unique Titles/dist/find.unique.titles.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -1524,10 +1524,10 @@ class PTP {
if (notFound) {
return true;
}
var torrents = parseAvailableTorrents(result);
if (onlyNew) {
return torrents.length === 0;
return false;
}
var torrents = parseAvailableTorrents(result);
for (var torrent of request.torrents) {
if (canUploadTorrent(torrent, torrents)) {
torrent.dom.style.border = "2px solid red";
Expand Down
4 changes: 2 additions & 2 deletions Find Unique Titles/src/trackers/PTP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ export default class PTP implements tracker {
if (notFound) {
return true;
}
const torrents = parseAvailableTorrents(result);
if (onlyNew) {
return torrents.length === 0;
return false;
}
const torrents = parseAvailableTorrents(result);
for (let torrent of request.torrents) {
if (canUploadTorrent(torrent, torrents)) {
torrent.dom.style.border = "2px solid red";
Expand Down

0 comments on commit 1df9bd9

Please sign in to comment.