Private GIT

Skip to content
Snippets Groups Projects
Commit 05b294c2 authored by Ruud's avatar Ruud
Browse files

Make sure KAT downloads the correct torrent. fixes #166

parent 121cb3c7
Branches
Tags
No related merge requests found
...@@ -65,7 +65,11 @@ class YarrProvider(Provider): ...@@ -65,7 +65,11 @@ class YarrProvider(Provider):
def belongsTo(self, url, host = None): def belongsTo(self, url, host = None):
try: try:
hostname = urlparse(url).hostname hostname = urlparse(url).hostname
download_url = host if host else self.urls['download'] if host and hostname in host:
return self
else:
for url_type in self.urls:
download_url = self.urls[url_type]
if hostname in download_url: if hostname in download_url:
return self return self
except: except:
......
...@@ -17,6 +17,7 @@ class KickAssTorrents(TorrentProvider): ...@@ -17,6 +17,7 @@ class KickAssTorrents(TorrentProvider):
'test': 'http://www.kat.ph/', 'test': 'http://www.kat.ph/',
'detail': 'http://www.kat.ph/%s-t%s.html', 'detail': 'http://www.kat.ph/%s-t%s.html',
'search': 'http://www.kat.ph/%s-i%s/', 'search': 'http://www.kat.ph/%s-i%s/',
'download': 'http://torcache.net/',
} }
cat_ids = [ cat_ids = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment