Skip to content

Commit

Permalink
Merge pull request #36 from ronggang/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Bright-W authored Sep 14, 2022
2 parents 51db808 + 4ece586 commit c4bfb50
Show file tree
Hide file tree
Showing 55 changed files with 924 additions and 1,611 deletions.
1 change: 1 addition & 0 deletions resource/schemas/Common/getSearchResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* 获取搜索结果
*/
getResult() {
console.log("Common schemas search js");
if (!this.haveData) {
return [];
}
Expand Down
32 changes: 13 additions & 19 deletions resource/schemas/GazelleJSONAPI/getSearchResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,37 +51,30 @@
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")) {
let torrents = group.torrents;
torrents.forEach(torrent => {
let data = {
title:
group.artist +
" - " +
(group.artist ? group.artist + " - " : "") +
group.groupName +
" [" +
group.groupYear +
"] [" +
group.releaseType +
"]",
subTitle:
torrent.format +
" / " +
torrent.encoding +
group.groupYear +
" / " +
torrent.media +
(torrent.hasLog ? ` / Log(${torrent.logScore})` : "") +
(group.releaseType ? " / " + group.releaseType : "") +
(torrent.format ? " / " + torrent.format : " / " + torrent.codec) +
(torrent.encoding ? " / " + torrent.encoding : " / " + torrent.resolution),

subTitle:
(torrent.container ? torrent.container: "") +
(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.remastered ? ` / Remaster / ${torrent.remasterYear} / ${torrent.remasterTitle}` : "") +
(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 +83,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
94 changes: 0 additions & 94 deletions resource/schemas/IPTorrents/config.json

This file was deleted.

5 changes: 3 additions & 2 deletions resource/schemas/NexusPHP/getSearchResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,11 @@
switch (options.site.host) {
case 'hdsky.me': {
let url_another = row.find('form[action*="download.php"]:eq(0)')
if (url_another) {
if (url_another.length > 0) {
url = url_another.attr('action')
break;
}
break;

}

default: {
Expand Down
6 changes: 3 additions & 3 deletions resource/sites/aidoru-online.me/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@
},
"uploaded": {
"selector": [".myBlock-content td:contains('Uploaded:') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": [".myBlock-content td:contains('Downloaded:') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"ratio": {
"selector": [".myBlock-content td:contains('Ratio:') + td"],
Expand All @@ -167,7 +167,7 @@
},
"seeding": {
"selector": ["b:contains('Currently seeding')"],
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):0"]
"filters": ["query.text().match(/(\\d+)/)", "(query && query.length>=2)?parseInt(query[1]):null"]
},
"seedingSize": {
"selector": ["b:contains('Currently seeding') + br + table tr:not(:first-child) > td:nth-child(4)"],
Expand Down
2 changes: 1 addition & 1 deletion resource/sites/animebytes.tv/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"selector": ["dt:contains('Seeding:') + dd"],
"filters": [
"query.text().trim().replace(/,|\\n/g,'').match(/([\\d.]+)/)",
"(query && query.length>=2)?parseFloat(query[1]):0"
"(query && query.length>=2)?parseFloat(query[1]):null"
]
},
"seedingSize": {
Expand Down
2 changes: 1 addition & 1 deletion resource/sites/anthelion.me/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"bonus": {
"selector": ["a[href*='store.php']"],
"filters": ["query.text().replace(/,/g,'').match(/.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:0"]
"filters": ["query.text().replace(/,/g,'').match(/.+?([\\d.]+)/)", "(query && query.length>=2)?query[1]:null"]
}
}
}
Expand Down
36 changes: 0 additions & 36 deletions resource/sites/avgv.cc/config.json

This file was deleted.

35 changes: 0 additions & 35 deletions resource/sites/avgv.cc/torrents.js

This file was deleted.

2 changes: 1 addition & 1 deletion resource/sites/baconbits.org/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"selector": ["li:contains('Seeding:')"],
"filters": [
"query.text().trim().replace(/,|\\n/g,'').match(/:.+?([\\d.]+)/)",
"(query && query.length>=2)?parseFloat(query[1]):0"
"(query && query.length>=2)?parseFloat(query[1]):null"
]
},
"seedingSize": {
Expand Down
4 changes: 2 additions & 2 deletions resource/sites/beyond-hd.me/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@
},
"uploaded": {
"selector": ["a[href*='uploads']:first"],
"filters": ["query.parent().text().trim().replace(/,|\\n|\\s+/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
"filters": ["query.parent().text().trim().replace(/,|\\n|\\s+/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["a[href*='downloads']:first"],
"filters": ["query.parent().text().trim().replace(/,|\\n|\\s+/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
"filters": ["query.parent().text().trim().replace(/,|\\n|\\s+/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"bonus": {
"selector": ["a[href*='bonus']:first"],
Expand Down
4 changes: 2 additions & 2 deletions resource/sites/bibliotik.me/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@
"fields": {
"uploaded": {
"selector": ["#pre_header_status li:contains('Up: ')"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["#pre_header_status li:contains('Down: ')"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"levelName": {
"selector": ["#detailsbox p:contains('Class: ')"],
Expand Down
6 changes: 3 additions & 3 deletions resource/sites/broadcasthe.net/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@
"selector": "#section2 > div > div.statistics > div:nth-child(3) > ul > li:nth-child(1)",
"filters": [
"query.text().replace(/,/g,'').match(/Upload.+?([\\d.]+ ?[TGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
"(query && query.length>=2)?(query[1]).sizeToNumber():null"
]
},
"downloaded": {
"selector": "#section2 > div > div.statistics > div:nth-child(3) > ul > li:nth-child(7)",
"filters": [
"query.text().replace(/,/g,'').match(/Downloaded.+?([\\d.]+ ?[TGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
"(query && query.length>=2)?(query[1]).sizeToNumber():null"
]
},
"ratio": {
Expand Down Expand Up @@ -87,7 +87,7 @@
"selector": "#section2 > div > div.statistics > div:nth-child(3) > ul > li:nth-child(4)",
"filters": [
"query.text().replace(/,/g,'').match(/Seeding:.+?(\\d+).+?/)",
"(query && query.length>=2)?(query[1]):0"
"(query && query.length>=2)?(query[1]):null"
]
},
"seedingSize": {
Expand Down
4 changes: 2 additions & 2 deletions resource/sites/bt.neu6.edu.cn/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
],
"filters": [
"query.text().match(/上传.*?([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
"(query && query.length>=2)?(query[1]).sizeToNumber():null"
]
},
"downloaded": {
Expand All @@ -58,7 +58,7 @@
],
"filters": [
"query.text().match(/下载.*?([\\d.]+ ?[ZEPTGMK]?i?B)/)",
"(query && query.length>=2)?(query[1]).sizeToNumber():0"
"(query && query.length>=2)?(query[1]).sizeToNumber():null"
]
},
"levelName": {
Expand Down
4 changes: 2 additions & 2 deletions resource/sites/bwtorrents.tv/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@
"fields": {
"uploaded": {
"selector": ["td.rowhead:contains('Uploaded') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["td.rowhead:contains('Downloaded') + td"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"levelName": {
"selector": "td.rowhead:contains('Class') + td"
Expand Down
4 changes: 2 additions & 2 deletions resource/sites/cinemageddon.net/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
"fields": {
"uploaded": {
"selector": ["td.clx > .frames td.rowhead:contains('Uploaded') + td:first"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"downloaded": {
"selector": ["td.clx > .frames td.rowhead:contains('Downloaded') + td:first"],
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():0"]
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>=2)?(query[1]).sizeToNumber():null"]
},
"levelName": {
"selector": "td.clx > .frames td.rowhead:contains('Class') + td:first"
Expand Down
Loading

0 comments on commit c4bfb50

Please sign in to comment.