Revert "Merge pull request #2560 from coolius/master"
This reverts commit64a196f21d, reversing changes made toa24d4a9e3b.
This commit is contained in:
1 parent
64a196f21d
commit
8a822e35e2
2 files changed
+8
-25
No files matched your search
@@ -18,12 +18,6 @@ config = [{
|
|||||||
'type': 'enabler',
|
'type': 'enabler',
|
||||||
'default': 0
|
'default': 0
|
||||||
},
|
},
|
||||||
{
|
|
||||||
'name': 'domain',
|
|
||||||
'advanced': True,
|
|
||||||
'label': 'Proxy server',
|
|
||||||
'description': 'Domain for requests, keep empty to let CouchPotato pick.',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
'name': 'seed_ratio',
|
'name': 'seed_ratio',
|
||||||
'label': 'Seed ratio',
|
'label': 'Seed ratio',
|
||||||
|
|||||||
@@ -1,27 +1,20 @@
|
|||||||
from couchpotato.core.helpers.variable import tryInt
|
from couchpotato.core.helpers.variable import tryInt
|
||||||
from couchpotato.core.logger import CPLog
|
from couchpotato.core.logger import CPLog
|
||||||
from couchpotato.core.providers.torrent.base import TorrentMagnetProvider
|
from couchpotato.core.providers.torrent.base import TorrentProvider
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
log = CPLog(__name__)
|
log = CPLog(__name__)
|
||||||
|
|
||||||
|
|
||||||
class Yify(TorrentMagnetProvider):
|
class Yify(TorrentProvider):
|
||||||
|
|
||||||
urls = {
|
urls = {
|
||||||
'test' : '%s/api',
|
'test' : 'https://yify-torrents.com/api',
|
||||||
'search' : '%s/api/list.json?keywords=%s&quality=%s',
|
'search' : 'https://yify-torrents.com/api/list.json?keywords=%s&quality=%s',
|
||||||
'detail': '%s/api/movie.json?id=%s'
|
'detail': 'https://yify-torrents.com/api/movie.json?id=%s'
|
||||||
}
|
}
|
||||||
|
|
||||||
http_time_between_calls = 1 #seconds
|
http_time_between_calls = 1 #seconds
|
||||||
|
|
||||||
proxy_list = [
|
|
||||||
'https://yify-torrents.im',
|
|
||||||
'http://yify.unlocktorrent.com',
|
|
||||||
'http://yify.ftwnet.co.uk',
|
|
||||||
'http://yify-torrents.com.come.in',
|
|
||||||
]
|
|
||||||
|
|
||||||
def search(self, movie, quality):
|
def search(self, movie, quality):
|
||||||
|
|
||||||
@@ -32,9 +25,7 @@ class Yify(TorrentMagnetProvider):
|
|||||||
|
|
||||||
def _search(self, movie, quality, results):
|
def _search(self, movie, quality, results):
|
||||||
|
|
||||||
search_url = self.urls['search'] % (self.getDomain(), movie['library']['identifier'], quality['identifier'])
|
data = self.getJsonData(self.urls['search'] % (movie['library']['identifier'], quality['identifier']))
|
||||||
|
|
||||||
data = self.getJsonData(search_url)
|
|
||||||
|
|
||||||
if data and data.get('MovieList'):
|
if data and data.get('MovieList'):
|
||||||
try:
|
try:
|
||||||
@@ -50,8 +41,8 @@ class Yify(TorrentMagnetProvider):
|
|||||||
results.append({
|
results.append({
|
||||||
'id': result['MovieID'],
|
'id': result['MovieID'],
|
||||||
'name': title,
|
'name': title,
|
||||||
'url': result['TorrentMagnetUrl'],
|
'url': result['TorrentUrl'],
|
||||||
'detail_url': self.urls['detail'] % (self.getDomain(),result['MovieID']),
|
'detail_url': self.urls['detail'] % result['MovieID'],
|
||||||
'size': self.parseSize(result['Size']),
|
'size': self.parseSize(result['Size']),
|
||||||
'seeders': tryInt(result['TorrentSeeds']),
|
'seeders': tryInt(result['TorrentSeeds']),
|
||||||
'leechers': tryInt(result['TorrentPeers'])
|
'leechers': tryInt(result['TorrentPeers'])
|
||||||
@@ -60,5 +51,3 @@ class Yify(TorrentMagnetProvider):
|
|||||||
except:
|
except:
|
||||||
log.error('Failed getting results from %s: %s', (self.getName(), traceback.format_exc()))
|
log.error('Failed getting results from %s: %s', (self.getName(), traceback.format_exc()))
|
||||||
|
|
||||||
def correctProxy(self, data):
|
|
||||||
return 'title="YIFY-Torrents RSS feed"' in data
|
|
||||||
Reference in new issue
Block a user