diff --git a/couchpotato/core/media/_base/providers/nzb/newznab.py b/couchpotato/core/media/_base/providers/nzb/newznab.py index 84b0e45..0f28db8 100644 --- a/couchpotato/core/media/_base/providers/nzb/newznab.py +++ b/couchpotato/core/media/_base/providers/nzb/newznab.py @@ -128,6 +128,7 @@ class Base(NZBProvider, RSS): api_keys = splitString(self.conf('api_key'), clean = False) extra_score = splitString(self.conf('extra_score'), clean = False) custom_tags = splitString(self.conf('custom_tag'), clean = False) + custom_categories = splitString(self.conf('custom_categories'), clean = False) list = [] for nr in range(len(hosts)): @@ -144,12 +145,16 @@ class Base(NZBProvider, RSS): try: custom_tag = custom_tags[nr] except: custom_tag = '' + try: custom_category = custom_categories[nr].replace(" ", ",") + except: custom_category = '' + list.append({ 'use': uses[nr], 'host': host, 'api_key': key, 'extra_score': score, - 'custom_tag': custom_tag + 'custom_tag': custom_tag, + 'custom_category' : custom_category }) return list @@ -266,6 +271,13 @@ config = [{ 'description': 'Add custom tags, for example add rls=1 to get only scene releases from nzbs.org', }, { + 'name': 'custom_categories', + 'advanced': True, + 'label': 'Custom Categories', + 'default': '2000,2000,2000,2000,2000,2000', + 'description': 'Specify categories to search in seperated by a single space, defaults to all movies. EG: "2030 2040 2060" would only search in HD, SD, and 3D movie categories', + }, + { 'name': 'api_key', 'default': ',,,,,', 'label': 'Api Key', diff --git a/couchpotato/core/media/_base/providers/torrent/kickasstorrents.py b/couchpotato/core/media/_base/providers/torrent/kickasstorrents.py index a4df2cc..791286a 100644 --- a/couchpotato/core/media/_base/providers/torrent/kickasstorrents.py +++ b/couchpotato/core/media/_base/providers/torrent/kickasstorrents.py @@ -50,8 +50,7 @@ class Base(TorrentMagnetProvider): 'https://kickass.bypassed.live', 'https://kickass.bypassed.video', 'https://kickass.bypassed.red', - 'https://kat.cr', - 'https://kickass.unblocked.pw/', + 'https://kickass.unblocked.pw', 'https://katproxy.com' ] diff --git a/couchpotato/core/media/_base/providers/torrent/thepiratebay.py b/couchpotato/core/media/_base/providers/torrent/thepiratebay.py index 4cd180b..4e84ceb 100644 --- a/couchpotato/core/media/_base/providers/torrent/thepiratebay.py +++ b/couchpotato/core/media/_base/providers/torrent/thepiratebay.py @@ -25,35 +25,18 @@ class Base(TorrentMagnetProvider): http_time_between_calls = 0 proxy_list = [ - 'https://thepiratebay.mn', - 'https://thepiratebay.gd', - 'https://thepiratebay.la', - 'https://pirateproxy.sx', - 'https://piratebay.host', - 'https://thepiratebay.expert', + 'https://pirateproxy.cat', 'https://pirateproxy.wf', 'https://pirateproxy.tf', 'https://urbanproxy.eu', - 'https://pirate.guru', 'https://piratebays.co', 'https://pirateproxy.yt', 'https://thepiratebay.uk.net', - 'https://tpb.ninja', - 'https://thehiddenbay.me', - 'https://ukunlocked.com', 'https://thebay.tv', - 'https://tpb.freed0m4all.net', - 'https://piratebays.eu', 'https://thepirateproxy.co', - 'https://thepiratebayz.com', - 'https://zaatoka.eu', - 'https://piratemirror.net', 'https://theproxypirate.pw', - 'https://torrentdr.com', - 'https://tpbproxy.co', 'https://arrr.xyz', - 'https://www.cleantpbproxy.com', - 'http://tpb.dashitz.com', + 'https://tpb.dashitz.com' ] def __init__(self): diff --git a/couchpotato/core/media/movie/providers/info/omdbapi.py b/couchpotato/core/media/movie/providers/info/omdbapi.py index 16f30ad..3f257c6 100644 --- a/couchpotato/core/media/movie/providers/info/omdbapi.py +++ b/couchpotato/core/media/movie/providers/info/omdbapi.py @@ -88,7 +88,8 @@ class OMDBAPI(MovieProvider): tmp_movie = movie.copy() for key in tmp_movie: - if tmp_movie.get(key).lower() == 'n/a': + tmp_movie_elem = tmp_movie.get(key) + if not isinstance(tmp_movie_elem, str) or tmp_movie_elem.lower() == 'n/a': del movie[key] year = tryInt(movie.get('Year', '')) diff --git a/couchpotato/core/media/movie/providers/nzb/newznab.py b/couchpotato/core/media/movie/providers/nzb/newznab.py index fc94acb..3392b91 100644 --- a/couchpotato/core/media/movie/providers/nzb/newznab.py +++ b/couchpotato/core/media/movie/providers/nzb/newznab.py @@ -23,4 +23,7 @@ class Newznab(MovieProvider, Base): if len(host.get('custom_tag', '')) > 0: query = '%s&%s' % (query, host.get('custom_tag')) + if len(host['custom_category']) > 0: + query = '%s&cat=%s' % (query, host['custom_category']) + return query