diff --git a/data/interfaces/default/config.html b/data/interfaces/default/config.html index 72657193..58aa8d59 100644 --- a/data/interfaces/default/config.html +++ b/data/interfaces/default/config.html @@ -601,23 +601,6 @@ -
-
- -
-
-
- - - Optional. Leave empty for default. -
-
- - -
-
-
-
@@ -2567,7 +2550,6 @@ initConfigCheckbox("#use_nzbsorg"); initConfigCheckbox("#use_omgwtfnzbs"); initConfigCheckbox("#use_torznab"); - initConfigCheckbox("#use_kat"); initConfigCheckbox("#use_piratebay"); initConfigCheckbox("#use_oldpiratebay"); initConfigCheckbox("#use_mininova"); diff --git a/headphones/config.py b/headphones/config.py index e41d7d9a..ce283481 100644 --- a/headphones/config.py +++ b/headphones/config.py @@ -150,9 +150,6 @@ _CONFIG_DEFINITIONS = { 'JOIN_ENABLED': (int, 'Join', 0), 'JOIN_ONSNATCH': (int, 'Join', 0), 'JOURNAL_MODE': (str, 'Advanced', 'wal'), - 'KAT': (int, 'Kat', 0), - 'KAT_PROXY_URL': (str, 'Kat', ''), - 'KAT_RATIO': (str, 'Kat', ''), 'KEEP_NFO': (int, 'General', 0), 'KEEP_TORRENT_FILES': (int, 'General', 0), 'KEEP_TORRENT_FILES_DIR': (path, 'General', ''), diff --git a/headphones/searcher.py b/headphones/searcher.py index baf4e815..920ef6cf 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -162,8 +162,6 @@ def get_seed_ratio(provider): if provider == 'rutracker.org': seed_ratio = headphones.CONFIG.RUTRACKER_RATIO - elif provider == 'Kick Ass Torrents': - seed_ratio = headphones.CONFIG.KAT_RATIO elif provider == 'Apollo.rip': seed_ratio = headphones.CONFIG.APOLLO_RATIO elif provider == 'Redacted': @@ -270,7 +268,6 @@ def do_sorted_search(album, new, losslessOnly, choose_specific_download=False): headphones.CONFIG.NZBGET_HOST) TORRENT_PROVIDERS = (headphones.CONFIG.TORZNAB or - headphones.CONFIG.KAT or headphones.CONFIG.PIRATEBAY or headphones.CONFIG.OLDPIRATEBAY or headphones.CONFIG.MININOVA or @@ -1370,66 +1367,6 @@ def searchTorrent(album, new=False, losslessOnly=False, albumlength=None, logger.exception( "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: provider = "Waffles.ch" providerurl = fix_url("https://waffles.ch/browse.php") diff --git a/headphones/webserve.py b/headphones/webserve.py index 885aef94..b7e58e90 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -1225,9 +1225,6 @@ class WebInterface(object): "torrentblackhole_dir": headphones.CONFIG.TORRENTBLACKHOLE_DIR, "download_torrent_dir": headphones.CONFIG.DOWNLOAD_TORRENT_DIR, "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), "piratebay_proxy_url": headphones.CONFIG.PIRATEBAY_PROXY_URL, "piratebay_ratio": headphones.CONFIG.PIRATEBAY_RATIO, @@ -1460,7 +1457,7 @@ class WebInterface(object): checked_configs = [ "launch_browser", "enable_https", "api_enabled", "use_blackhole", "headphones_indexer", "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_apollo", "use_redacted", "preferred_bitrate_allow_lossless", "detect_bitrate", "ignore_clean_releases", "freeze_db", "cue_split", "move_files",