IPT provider now searches in multiple categories.
This commit is contained in:
1 parent
fb0719d677
commit
2d2b0c9048
1 file changed
+5
-5
@@ -23,7 +23,7 @@ class Base(TorrentProvider):
|
|||||||
'base_url' : 'http://www.iptorrents.com',
|
'base_url' : 'http://www.iptorrents.com',
|
||||||
'login' : 'http://www.iptorrents.com/torrents/',
|
'login' : 'http://www.iptorrents.com/torrents/',
|
||||||
'login_check': 'http://www.iptorrents.com/inbox.php',
|
'login_check': 'http://www.iptorrents.com/inbox.php',
|
||||||
'search' : 'http://www.iptorrents.com/torrents/?l%d=1%%s&q=%s&qf=ti&p=%%d',
|
'search' : 'http://www.iptorrents.com/torrents/?%s%%s&q=%s&qf=ti&p=%%d',
|
||||||
}
|
}
|
||||||
|
|
||||||
http_time_between_calls = 1 #seconds
|
http_time_between_calls = 1 #seconds
|
||||||
@@ -31,13 +31,13 @@ class Base(TorrentProvider):
|
|||||||
|
|
||||||
def _buildUrl(self, query, quality_identifier, cat_ids_group = None):
|
def _buildUrl(self, query, quality_identifier, cat_ids_group = None):
|
||||||
|
|
||||||
# TODO this should support searching multiple cat_ids under a group
|
cat_ids = self.getCatId(quality_identifier, cat_ids_group)
|
||||||
cat_id = self.getCatId(quality_identifier, cat_ids_group)[0]
|
|
||||||
if not cat_id:
|
if not len(cat_ids):
|
||||||
log.warning('Unable to find category for quality %s', quality_identifier)
|
log.warning('Unable to find category for quality %s', quality_identifier)
|
||||||
return
|
return
|
||||||
|
|
||||||
return self.urls['search'] % (cat_id, tryUrlencode(query).replace('%', '%%'))
|
return self.urls['search'] % ("&".join(("l%d=" % x) for x in cat_ids), tryUrlencode(query).replace('%', '%%'))
|
||||||
|
|
||||||
def _searchOnTitle(self, title, media, quality, results):
|
def _searchOnTitle(self, title, media, quality, results):
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user