Browse Source

Merge 8c8d74f299 into 711310d0c3

pull/7192/merge
TheQwertiest 8 years ago
committed by GitHub
parent
commit
02946c0bc5
  1. 14
      couchpotato/core/media/_base/providers/nzb/newznab.py
  2. 3
      couchpotato/core/media/_base/providers/torrent/kickasstorrents.py
  3. 21
      couchpotato/core/media/_base/providers/torrent/thepiratebay.py
  4. 3
      couchpotato/core/media/movie/providers/info/omdbapi.py
  5. 3
      couchpotato/core/media/movie/providers/nzb/newznab.py

14
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',

3
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'
]

21
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):

3
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', ''))

3
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

Loading…
Cancel
Save