mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-20 16:03:59 +01:00
Remove Kick Ass
This commit is contained in:
@@ -601,23 +601,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
<div class="row checkbox left">
|
|
||||||
<input id="use_kat" type="checkbox" class="bigcheck" name="use_kat" value="1" ${config['use_kat']} /><label for="use_kat"><span class="option">Kick Ass Torrents</span></label>
|
|
||||||
</div>
|
|
||||||
<div class="config">
|
|
||||||
<div class="row">
|
|
||||||
<label>Proxy URL</label>
|
|
||||||
<input type="text" name="kat_proxy_url" value="${config['kat_proxy_url']}" size="36">
|
|
||||||
<small>Optional. Leave empty for default.</small>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<label>Seed Ratio</label>
|
|
||||||
<input type="text" class="override-float" name="kat_ratio" value="${config['kat_ratio']}" size="10" title="Stop seeding when ratio met, 0 = unlimited. Scheduled job will remove torrent when post processed and finished seeding">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<div class="row checkbox left">
|
<div class="row checkbox left">
|
||||||
<input id="use_waffles" type="checkbox" class="bigcheck" name="use_waffles" value="1" ${config['use_waffles']} /><label for="use_waffles"><span class="option">Waffles.ch</span></label>
|
<input id="use_waffles" type="checkbox" class="bigcheck" name="use_waffles" value="1" ${config['use_waffles']} /><label for="use_waffles"><span class="option">Waffles.ch</span></label>
|
||||||
@@ -2567,7 +2550,6 @@
|
|||||||
initConfigCheckbox("#use_nzbsorg");
|
initConfigCheckbox("#use_nzbsorg");
|
||||||
initConfigCheckbox("#use_omgwtfnzbs");
|
initConfigCheckbox("#use_omgwtfnzbs");
|
||||||
initConfigCheckbox("#use_torznab");
|
initConfigCheckbox("#use_torznab");
|
||||||
initConfigCheckbox("#use_kat");
|
|
||||||
initConfigCheckbox("#use_piratebay");
|
initConfigCheckbox("#use_piratebay");
|
||||||
initConfigCheckbox("#use_oldpiratebay");
|
initConfigCheckbox("#use_oldpiratebay");
|
||||||
initConfigCheckbox("#use_mininova");
|
initConfigCheckbox("#use_mininova");
|
||||||
|
|||||||
@@ -150,9 +150,6 @@ _CONFIG_DEFINITIONS = {
|
|||||||
'JOIN_ENABLED': (int, 'Join', 0),
|
'JOIN_ENABLED': (int, 'Join', 0),
|
||||||
'JOIN_ONSNATCH': (int, 'Join', 0),
|
'JOIN_ONSNATCH': (int, 'Join', 0),
|
||||||
'JOURNAL_MODE': (str, 'Advanced', 'wal'),
|
'JOURNAL_MODE': (str, 'Advanced', 'wal'),
|
||||||
'KAT': (int, 'Kat', 0),
|
|
||||||
'KAT_PROXY_URL': (str, 'Kat', ''),
|
|
||||||
'KAT_RATIO': (str, 'Kat', ''),
|
|
||||||
'KEEP_NFO': (int, 'General', 0),
|
'KEEP_NFO': (int, 'General', 0),
|
||||||
'KEEP_TORRENT_FILES': (int, 'General', 0),
|
'KEEP_TORRENT_FILES': (int, 'General', 0),
|
||||||
'KEEP_TORRENT_FILES_DIR': (path, 'General', ''),
|
'KEEP_TORRENT_FILES_DIR': (path, 'General', ''),
|
||||||
|
|||||||
@@ -162,8 +162,6 @@ def get_seed_ratio(provider):
|
|||||||
|
|
||||||
if provider == 'rutracker.org':
|
if provider == 'rutracker.org':
|
||||||
seed_ratio = headphones.CONFIG.RUTRACKER_RATIO
|
seed_ratio = headphones.CONFIG.RUTRACKER_RATIO
|
||||||
elif provider == 'Kick Ass Torrents':
|
|
||||||
seed_ratio = headphones.CONFIG.KAT_RATIO
|
|
||||||
elif provider == 'Apollo.rip':
|
elif provider == 'Apollo.rip':
|
||||||
seed_ratio = headphones.CONFIG.APOLLO_RATIO
|
seed_ratio = headphones.CONFIG.APOLLO_RATIO
|
||||||
elif provider == 'Redacted':
|
elif provider == 'Redacted':
|
||||||
@@ -270,7 +268,6 @@ def do_sorted_search(album, new, losslessOnly, choose_specific_download=False):
|
|||||||
headphones.CONFIG.NZBGET_HOST)
|
headphones.CONFIG.NZBGET_HOST)
|
||||||
|
|
||||||
TORRENT_PROVIDERS = (headphones.CONFIG.TORZNAB or
|
TORRENT_PROVIDERS = (headphones.CONFIG.TORZNAB or
|
||||||
headphones.CONFIG.KAT or
|
|
||||||
headphones.CONFIG.PIRATEBAY or
|
headphones.CONFIG.PIRATEBAY or
|
||||||
headphones.CONFIG.OLDPIRATEBAY or
|
headphones.CONFIG.OLDPIRATEBAY or
|
||||||
headphones.CONFIG.MININOVA or
|
headphones.CONFIG.MININOVA or
|
||||||
@@ -1370,66 +1367,6 @@ def searchTorrent(album, new=False, losslessOnly=False, albumlength=None,
|
|||||||
logger.exception(
|
logger.exception(
|
||||||
"An unknown error occurred trying to parse the feed: %s" % e)
|
"An unknown error occurred trying to parse the feed: %s" % e)
|
||||||
|
|
||||||
if headphones.CONFIG.KAT:
|
|
||||||
provider = "Kick Ass Torrents"
|
|
||||||
ka_term = term.replace("!", "")
|
|
||||||
|
|
||||||
# Use proxy if specified
|
|
||||||
if headphones.CONFIG.KAT_PROXY_URL:
|
|
||||||
providerurl = fix_url(set_proxy(headphones.CONFIG.KAT_PROXY_URL))
|
|
||||||
else:
|
|
||||||
providerurl = fix_url("https://katcr.co/new/")
|
|
||||||
|
|
||||||
# Build URL
|
|
||||||
providerurl = providerurl + "/usearch/" + ka_term
|
|
||||||
|
|
||||||
# Set max size and category
|
|
||||||
if headphones.CONFIG.PREFERRED_QUALITY == 3 or losslessOnly:
|
|
||||||
maxsize = 10000000000
|
|
||||||
providerurl += " category:lossless/"
|
|
||||||
elif headphones.CONFIG.PREFERRED_QUALITY == 1 or allow_lossless:
|
|
||||||
maxsize = 10000000000
|
|
||||||
providerurl += " category:music/"
|
|
||||||
else:
|
|
||||||
maxsize = 300000000
|
|
||||||
providerurl += " category:music/"
|
|
||||||
|
|
||||||
# Requesting content
|
|
||||||
logger.info("Searching %s using term: %s" % (provider, ka_term))
|
|
||||||
|
|
||||||
params = {
|
|
||||||
"field": "seeders",
|
|
||||||
"sorder": "desc",
|
|
||||||
"rss": "1"
|
|
||||||
}
|
|
||||||
|
|
||||||
data = request.request_feed(url=providerurl, params=params,
|
|
||||||
whitelist_status_code=[404])
|
|
||||||
|
|
||||||
# Process feed
|
|
||||||
if data:
|
|
||||||
if not len(data.entries):
|
|
||||||
logger.info("No results found on %s using search term: %s" % (provider, ka_term))
|
|
||||||
else:
|
|
||||||
for item in data.entries:
|
|
||||||
try:
|
|
||||||
title = item['title']
|
|
||||||
seeders = item['torrent_seeds']
|
|
||||||
if headphones.CONFIG.TORRENT_DOWNLOADER == 0:
|
|
||||||
url = item['links'][1]['href']
|
|
||||||
else:
|
|
||||||
url = item['torrent_magneturi']
|
|
||||||
size = int(item['links'][1]['length'])
|
|
||||||
if size < maxsize and minimumseeders < int(seeders):
|
|
||||||
resultlist.append((title, size, url, provider, 'torrent', True))
|
|
||||||
logger.info('Found %s. Size: %s' % (title, helpers.bytes_to_mb(size)))
|
|
||||||
else:
|
|
||||||
logger.info(
|
|
||||||
'%s is larger than the maxsize or has too little seeders for this category, skipping. (Size: %i bytes, Seeders: %d)',
|
|
||||||
title, size, int(seeders))
|
|
||||||
except Exception as e:
|
|
||||||
logger.exception("Unhandled exception in the KAT parser")
|
|
||||||
|
|
||||||
if headphones.CONFIG.WAFFLES:
|
if headphones.CONFIG.WAFFLES:
|
||||||
provider = "Waffles.ch"
|
provider = "Waffles.ch"
|
||||||
providerurl = fix_url("https://waffles.ch/browse.php")
|
providerurl = fix_url("https://waffles.ch/browse.php")
|
||||||
|
|||||||
@@ -1225,9 +1225,6 @@ class WebInterface(object):
|
|||||||
"torrentblackhole_dir": headphones.CONFIG.TORRENTBLACKHOLE_DIR,
|
"torrentblackhole_dir": headphones.CONFIG.TORRENTBLACKHOLE_DIR,
|
||||||
"download_torrent_dir": headphones.CONFIG.DOWNLOAD_TORRENT_DIR,
|
"download_torrent_dir": headphones.CONFIG.DOWNLOAD_TORRENT_DIR,
|
||||||
"numberofseeders": headphones.CONFIG.NUMBEROFSEEDERS,
|
"numberofseeders": headphones.CONFIG.NUMBEROFSEEDERS,
|
||||||
"use_kat": checked(headphones.CONFIG.KAT),
|
|
||||||
"kat_proxy_url": headphones.CONFIG.KAT_PROXY_URL,
|
|
||||||
"kat_ratio": headphones.CONFIG.KAT_RATIO,
|
|
||||||
"use_piratebay": checked(headphones.CONFIG.PIRATEBAY),
|
"use_piratebay": checked(headphones.CONFIG.PIRATEBAY),
|
||||||
"piratebay_proxy_url": headphones.CONFIG.PIRATEBAY_PROXY_URL,
|
"piratebay_proxy_url": headphones.CONFIG.PIRATEBAY_PROXY_URL,
|
||||||
"piratebay_ratio": headphones.CONFIG.PIRATEBAY_RATIO,
|
"piratebay_ratio": headphones.CONFIG.PIRATEBAY_RATIO,
|
||||||
@@ -1460,7 +1457,7 @@ class WebInterface(object):
|
|||||||
checked_configs = [
|
checked_configs = [
|
||||||
"launch_browser", "enable_https", "api_enabled", "use_blackhole", "headphones_indexer",
|
"launch_browser", "enable_https", "api_enabled", "use_blackhole", "headphones_indexer",
|
||||||
"use_newznab", "newznab_enabled", "use_torznab", "torznab_enabled",
|
"use_newznab", "newznab_enabled", "use_torznab", "torznab_enabled",
|
||||||
"use_nzbsorg", "use_omgwtfnzbs", "use_kat", "use_piratebay", "use_oldpiratebay",
|
"use_nzbsorg", "use_omgwtfnzbs", "use_piratebay", "use_oldpiratebay",
|
||||||
"use_mininova", "use_waffles", "use_rutracker",
|
"use_mininova", "use_waffles", "use_rutracker",
|
||||||
"use_apollo", "use_redacted", "preferred_bitrate_allow_lossless",
|
"use_apollo", "use_redacted", "preferred_bitrate_allow_lossless",
|
||||||
"detect_bitrate", "ignore_clean_releases", "freeze_db", "cue_split", "move_files",
|
"detect_bitrate", "ignore_clean_releases", "freeze_db", "cue_split", "move_files",
|
||||||
|
|||||||
Reference in New Issue
Block a user