Make sure KAT downloads the correct torrent. fixes #166
This commit is contained in:
1 parent
121cb3c7b4
commit
05b294c231
2 files changed
+7
-2
No files matched your search
@@ -65,9 +65,13 @@ class YarrProvider(Provider):
|
||||
def belongsTo(self, url, host = None):
|
||||
try:
|
||||
hostname = urlparse(url).hostname
|
||||
download_url = host if host else self.urls['download']
|
||||
if hostname in download_url:
|
||||
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:
|
||||
return self
|
||||
except:
|
||||
log.debug('Url % s doesn\'t belong to %s' % (url, self.getName()))
|
||||
|
||||
|
||||
Reference in new issue
Block a user