Skip to content

Commit

Permalink
feat(GazelleJSONAPI): support show Leech Status and NL
Browse files Browse the repository at this point in the history
  • Loading branch information
ted423 committed Sep 6, 2022
1 parent 31f303c commit ef0ed34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 164 deletions.
10 changes: 3 additions & 7 deletions resource/schemas/GazelleJSONAPI/getSearchResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
let results = [];
let authkey = this.authkey;
let passkey = this.passkey;
console.log("groups.length", groups.length);
//console.log("groups.length", groups.length);
try {
groups.forEach(group => {
if (group.hasOwnProperty("torrents")) {
Expand All @@ -76,12 +76,7 @@
(torrent.hasLog ? ` / Log(${torrent.logScore})` : "") +
(torrent.hasCue ? " / Cue" : "") +
(torrent.remastered ? ` / ${torrent.remasterYear} / ${torrent.remasterTitle}` : "") +
(torrent.scene ? " / Scene" : "") +
(torrent.isFreeleech ||
torrent.isNeutralLeech ||
torrent.isPersonalFreeleech
? " / Freeleech"
: ""),
(torrent.scene ? " / Scene" : ""),
link: `${site.url}torrents.php?id=${group.groupId}&torrentid=${torrent.torrentId}`,
url: `${site.url}torrents.php?action=download&id=${torrent.torrentId}&authkey=${authkey}&torrent_pass=${passkey}`,
size: parseFloat(torrent.size),
Expand All @@ -90,6 +85,7 @@
leechers: torrent.leechers,
completed: torrent.snatches,
site: site,
tags: (torrent.isFreeleech || torrent.isPersonalFreeleech)?[{name: "Free",color: "blue"}]:torrent.isNeutralLeech?[{name: "Neutral",color: "purple"}]:[{"":""}],
entryName: options.entry.name,
category: group.releaseType
};
Expand Down
10 changes: 4 additions & 6 deletions resource/sites/hdf.world/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@
}],
"securityKeyFields": ["authkey", "torrent_pass"],
"searchEntryConfig": {
"skipIMDbId": true,
"page": "/ajax.php",
"resultType": "json",
"parseScriptFile": "getSearchResult.js",
"asyncParse": true,
"queryString": "action=browse&searchstr=$key$"
"skipIMDbId": true
},
"searchEntry": [{
"name": "all",
Expand Down Expand Up @@ -80,5 +75,8 @@
}
}
}
},
"supportedFeatures": {
"imdbSearch": false
}
}
151 changes: 0 additions & 151 deletions resource/sites/hdf.world/getSearchResult.js

This file was deleted.

0 comments on commit ef0ed34

Please sign in to comment.