Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
@@ -29,6 +29,9 @@ class Base(TorrentProvider):
|
||||
}
|
||||
post_data.update(params)
|
||||
|
||||
if self.conf('internal_only'):
|
||||
post_data.update({'origin': [1]})
|
||||
|
||||
try:
|
||||
result = self.getJsonData(self.urls['api'], data = json.dumps(post_data))
|
||||
|
||||
@@ -110,6 +113,14 @@ config = [{
|
||||
'default': 0,
|
||||
'description': 'Starting score for each release found via this provider.',
|
||||
},
|
||||
{
|
||||
'name': 'internal_only',
|
||||
'advanced': True,
|
||||
'label': 'Internal Only',
|
||||
'type': 'bool',
|
||||
'default': False,
|
||||
'description': 'Only download releases marked as HDBits internal'
|
||||
}
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -12,17 +12,16 @@ class Base(TorrentMagnetProvider):
|
||||
|
||||
urls = {
|
||||
'test': '%s/api',
|
||||
'search': '%s/api/list.json?keywords=%s&quality=%s',
|
||||
'search': '%s/api/list.json?keywords=%s',
|
||||
'detail': '%s/api/movie.json?id=%s'
|
||||
}
|
||||
|
||||
http_time_between_calls = 1 # seconds
|
||||
|
||||
proxy_list = [
|
||||
'http://yify.unlocktorrent.com',
|
||||
'http://yify-torrents.com.come.in',
|
||||
'http://yts.re',
|
||||
'http://yts.im'
|
||||
'https://yts.re',
|
||||
'http://ytsproxy.come.in',
|
||||
'http://yts.im',
|
||||
'http://yify-torrents.im',
|
||||
]
|
||||
|
||||
@@ -39,7 +38,7 @@ class Base(TorrentMagnetProvider):
|
||||
if not domain:
|
||||
return
|
||||
|
||||
search_url = self.urls['search'] % (domain, getIdentifier(movie), quality['identifier'])
|
||||
search_url = self.urls['search'] % (domain, getIdentifier(movie))
|
||||
|
||||
data = self.getJsonData(search_url)
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class MovieBase(MovieTypeBase):
|
||||
return False
|
||||
elif not params.get('info'):
|
||||
try:
|
||||
is_movie = fireEvent('movie.is_movie', identifier = params.get('identifier'), single = True)
|
||||
is_movie = fireEvent('movie.is_movie', identifier = params.get('identifier'), adding = True, single = True)
|
||||
if not is_movie:
|
||||
msg = 'Can\'t add movie, seems to be a TV show.'
|
||||
log.error(msg)
|
||||
|
||||
@@ -69,12 +69,15 @@ class CouchPotatoApi(MovieProvider):
|
||||
name_enc = base64.b64encode(ss(name))
|
||||
return self.getJsonData(self.urls['validate'] % name_enc, headers = self.getRequestHeaders())
|
||||
|
||||
def isMovie(self, identifier = None):
|
||||
def isMovie(self, identifier = None, adding = False):
|
||||
|
||||
if not identifier:
|
||||
return
|
||||
|
||||
data = self.getJsonData(self.urls['is_movie'] % identifier, headers = self.getRequestHeaders())
|
||||
url = self.urls['is_movie'] % identifier
|
||||
url += '?adding=1' if adding else ''
|
||||
|
||||
data = self.getJsonData(url, headers = self.getRequestHeaders())
|
||||
if data:
|
||||
return data.get('is_movie', True)
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class DelugeTransfer(object):
|
||||
self.disconnect()
|
||||
|
||||
self.sock = socket.create_connection(hostport)
|
||||
self.conn = ssl.wrap_socket(self.sock, None, None, False, ssl.CERT_NONE, ssl.PROTOCOL_SSLv3)
|
||||
self.conn = ssl.wrap_socket(self.sock, None, None, False, ssl.CERT_NONE, ssl.PROTOCOL_TLSv1)
|
||||
self.connected = True
|
||||
|
||||
def disconnect(self):
|
||||
|
||||
Reference in New Issue
Block a user