mirror of
https://github.com/YGGverse/qbittorrent-yggtracker-search-plugin.git
synced 2026-04-01 18:15:28 +00:00
Compare commits
No commits in common. "main" and "1.0.0" have entirely different histories.
2 changed files with 42 additions and 73 deletions
73
nodes.json
73
nodes.json
|
|
@ -1,55 +1,28 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name":"YGGtracker",
|
"name":"YGGtracker",
|
||||||
"description":"YGGtracker official",
|
"description":"YGGtracker official node",
|
||||||
"url":"http://[201:23b4:991a:634d:8359:4521:5576:15b7]/yggtracker/api/torrents?%s",
|
"url":"http://[201:23b4:991a:634d:8359:4521:5576:15b7]/yggtracker/",
|
||||||
"categories":
|
"api":"http://[201:23b4:991a:634d:8359:4521:5576:15b7]/yggtracker/api/torrents?%s",
|
||||||
{
|
"sensitive":null,
|
||||||
"all":[
|
"yggdrasil":null,
|
||||||
"movie",
|
"locale":"en",
|
||||||
"series",
|
"locales":
|
||||||
"tv",
|
[
|
||||||
"animation",
|
"en",
|
||||||
"music",
|
"cs",
|
||||||
"game",
|
"eo",
|
||||||
"audiobook",
|
"fr",
|
||||||
"podcast",
|
"ka",
|
||||||
"book",
|
"de",
|
||||||
"archive",
|
"he",
|
||||||
"picture",
|
"it",
|
||||||
"software",
|
"lv",
|
||||||
"other"
|
"pl",
|
||||||
],
|
"pt",
|
||||||
"anime":[
|
"ru",
|
||||||
"animation"
|
"es",
|
||||||
],
|
"uk"
|
||||||
"books":
|
]
|
||||||
[
|
|
||||||
"book",
|
|
||||||
"audiobook"
|
|
||||||
],
|
|
||||||
"games":[
|
|
||||||
"game"
|
|
||||||
],
|
|
||||||
"movies":[
|
|
||||||
"movie",
|
|
||||||
"series"
|
|
||||||
],
|
|
||||||
"music":[
|
|
||||||
"music"
|
|
||||||
],
|
|
||||||
"pictures":[
|
|
||||||
"picture"
|
|
||||||
],
|
|
||||||
"software":[
|
|
||||||
"software",
|
|
||||||
"archive"
|
|
||||||
],
|
|
||||||
"tv":[
|
|
||||||
"tv",
|
|
||||||
"podcast",
|
|
||||||
"series"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# VERSION: 1.1.0
|
# VERSION: 1.00
|
||||||
# LICENSE: MIT
|
# LICENSE: MIT
|
||||||
# AUTHORS: https://github.com/YGGverse/qbittorrent-yggtracker-search-plugin
|
# AUTHORS: https://github.com/YGGverse/qbittorrent-yggtracker-search-plugin
|
||||||
|
|
||||||
|
|
@ -12,17 +12,6 @@ class yggtracker(object):
|
||||||
|
|
||||||
name = 'YGGtracker'
|
name = 'YGGtracker'
|
||||||
url = 'https://github.com/YGGverse/YGGtracker'
|
url = 'https://github.com/YGGverse/YGGtracker'
|
||||||
supported_categories = {
|
|
||||||
'all':[],
|
|
||||||
'anime':[],
|
|
||||||
'books':[],
|
|
||||||
'games':[],
|
|
||||||
'movies':[],
|
|
||||||
'music':[],
|
|
||||||
'pictures':[],
|
|
||||||
'software':[],
|
|
||||||
'tv':[]
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|
@ -43,20 +32,27 @@ class yggtracker(object):
|
||||||
# apply query request
|
# apply query request
|
||||||
what = unquote(what)
|
what = unquote(what)
|
||||||
params = {
|
params = {
|
||||||
'query': what,
|
'query': what
|
||||||
'filter': 'true'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# apply categories filter
|
# apply locales filter
|
||||||
categories = []
|
if len(node['locales']) > 0:
|
||||||
for category in node['categories'][cat]:
|
params['locales'] = '|'.join(node['locales'])
|
||||||
categories.append(category)
|
|
||||||
|
|
||||||
if len(categories) > 0:
|
# apply sensitive filter
|
||||||
params['categories'] = '|'.join(categories)
|
if node['sensitive'] is True:
|
||||||
|
params['sensitive'] = '1'
|
||||||
|
if node['sensitive'] is False:
|
||||||
|
params['sensitive'] = '0'
|
||||||
|
|
||||||
|
# apply yggdrasil filter
|
||||||
|
if node['yggdrasil'] is True:
|
||||||
|
params['yggdrasil'] = '1'
|
||||||
|
if node['yggdrasil'] is False:
|
||||||
|
params['yggdrasil'] = '0'
|
||||||
|
|
||||||
# send api request
|
# send api request
|
||||||
response = retrieve_url(node['url'] % urlencode(params))
|
response = retrieve_url(node['api'] % urlencode(params))
|
||||||
response_json = json.loads(response)
|
response_json = json.loads(response)
|
||||||
|
|
||||||
# check empty response
|
# check empty response
|
||||||
|
|
@ -71,7 +67,7 @@ class yggtracker(object):
|
||||||
'size': str(item['torrent']['file']['size']) + " B",
|
'size': str(item['torrent']['file']['size']) + " B",
|
||||||
'seeds': item['torrent']['scrape']['seeders'],
|
'seeds': item['torrent']['scrape']['seeders'],
|
||||||
'leech': item['torrent']['scrape']['leechers'],
|
'leech': item['torrent']['scrape']['leechers'],
|
||||||
'engine_url': response_json['tracker']['url'],
|
'engine_url': node['url'],
|
||||||
'desc_link': item['torrent']['url']
|
'desc_link': item['torrent']['url'][node['locale']]
|
||||||
}
|
}
|
||||||
prettyPrinter(res)
|
prettyPrinter(res)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue