mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Updated KAT urls.
Fixed unicode issues with KAT, iptorrents, and TPB providers. Fix for Newznab providers. GIT Updates now perform auto-resets of branch on errors then attempt update again.
This commit is contained in:
parent
0e34a41485
commit
c678b96732
@ -162,9 +162,11 @@ class IPTorrentsProvider(generic.TorrentProvider):
|
||||
|
||||
for mode in search_params.keys():
|
||||
for search_string in search_params[mode]:
|
||||
if isinstance(search_string, unicode):
|
||||
search_string = unidecode(search_string)
|
||||
|
||||
# URL with 50 tv-show results, or max 150 if adjusted in IPTorrents profile
|
||||
searchURL = self.urls['search'] % (self.categorie, freeleech, unidecode(search_string))
|
||||
searchURL = self.urls['search'] % (self.categorie, freeleech, search_string)
|
||||
searchURL += ';o=seeders' if mode != 'RSS' else ''
|
||||
|
||||
logger.log(u"" + self.name + " search page URL: " + searchURL, logger.DEBUG)
|
||||
|
@ -225,10 +225,12 @@ class KATProvider(generic.TorrentProvider):
|
||||
|
||||
for mode in search_params.keys():
|
||||
for search_string in search_params[mode]:
|
||||
if isinstance(search_string, unicode):
|
||||
search_string = unidecode(search_string)
|
||||
|
||||
entries = []
|
||||
for url in self.urls:
|
||||
searchURL = url + 'usearch/%s/?field=seeders&sorder=desc&rss=1' % urllib.urlencode(search_string.encode('utf-8'))
|
||||
searchURL = url + 'usearch/%s/?field=seeders&sorder=desc&rss=1' % urllib.quote(search_string)
|
||||
logger.log(u"Search string: " + searchURL, logger.DEBUG)
|
||||
|
||||
entries = self.cache.getRSSFeed(url, items=['entries', 'feed'])['entries']
|
||||
|
@ -230,9 +230,11 @@ class ThePirateBayProvider(generic.TorrentProvider):
|
||||
|
||||
for mode in search_params.keys():
|
||||
for search_string in search_params[mode]:
|
||||
if isinstance(search_string, unicode):
|
||||
search_string = unidecode(search_string)
|
||||
|
||||
if mode != 'RSS':
|
||||
searchURL = self.proxy._buildURL(self.searchurl % (urllib.quote(unidecode(search_string))))
|
||||
searchURL = self.proxy._buildURL(self.searchurl % (urllib.quote(search_string)))
|
||||
else:
|
||||
searchURL = self.proxy._buildURL(self.url + 'tv/latest/')
|
||||
|
||||
|
@ -557,6 +557,23 @@ class GitUpdateManager(UpdateManager):
|
||||
if sickbeard.NOTIFY_ON_UPDATE:
|
||||
notifiers.notify_git_update(sickbeard.CUR_COMMIT_HASH if sickbeard.CUR_COMMIT_HASH else "")
|
||||
return True
|
||||
else:
|
||||
# perform a hard reset to try and resolve the issue
|
||||
if self.reset() and self.update():
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def reset(self):
|
||||
"""
|
||||
Calls git reset --hard to perform a hard reset. Returns a bool depending
|
||||
on the call's success.
|
||||
"""
|
||||
|
||||
output, err, exit_status = self._run_git(self._git_path, 'reset --hard') # @UnusedVariable
|
||||
|
||||
if exit_status == 0:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user