Skip to content

Commit fb054aa

Browse files
committed
feat(MTV): support 工具栏
confirmSize is not work yet
1 parent 09ef51c commit fb054aa

File tree

1 file changed

+31
-5
lines changed

1 file changed

+31
-5
lines changed

resource/sites/www.morethantv.me/config.json

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,23 @@
33
"timezoneOffset": "+0000",
44
"description": "",
55
"icon": "https://www.morethantv.me/favicon.ico",
6-
"schema": "Luminance",
6+
"schema": "Common",
77
"tags": ["电视剧", "剧集"],
88
"url": "https://www.morethantv.me",
99
"collaborator": "luckiestone",
1010
"host": "www.morethantv.me",
1111
"formerHosts": [
1212
"www.morethan.tv"
1313
],
14-
"supportedFeatures": {
15-
"search": false,
16-
"imdbSearch": false
17-
},
14+
"plugins": [{
15+
"name": "种子详情页面",
16+
"pages": ["/torrents.php"],
17+
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/details.js"]
18+
}, {
19+
"name": "种子列表",
20+
"pages": ["/torrents/browse", "/show/(\\d+)/$","/collages.php"],
21+
"scripts": ["/schemas/NexusPHP/common.js", "/schemas/Common/torrents.js"]
22+
}],
1823
"selectors": {
1924
"userBaseInfo": {
2025
"merge": true,
@@ -74,6 +79,27 @@
7479
"filters": ["query.attr('title')||query.text()", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
7580
}
7681
}
82+
},
83+
"common": {
84+
"page": "/torrents.php",
85+
"fields": {
86+
"downloadURL": {
87+
"selector": ["tr[id*='torrentinfo'][class!='hidden']"],
88+
"filters": ["query.prev().find(\"a[href*='action=download']\").attr('href')"]
89+
},
90+
"size": {
91+
"selector": ["tr.group_torrent > td.nobr"],
92+
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
93+
},
94+
"downloadURLs": {
95+
"selector": ["a[href*='action=download']"],
96+
"filters": ["query.toArray()"]
97+
},
98+
"confirmSize": {
99+
"selector": ["tr.group_torrent > td.nobr"],
100+
"filters": ["query.text().replace(/,/g,'').match(/([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length>1)?(query[1]).sizeToNumber():0"]
101+
}
102+
}
77103
}
78104
}
79105
}

0 commit comments

Comments
 (0)