1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Fix for sql mass add issues.

Fix for KAT and TPB providers.
Fix for Newznab providers.
This commit is contained in:
echel0n 2014-04-27 06:46:08 -07:00
parent 12ca73bb0e
commit fb0339a274
4 changed files with 17 additions and 3 deletions

View File

@ -381,4 +381,4 @@ class TorrentProvider(GenericProvider):
def __init__(self, name):
GenericProvider.__init__(self, name)
self.providerType = GenericProvider.TORRENT
self.providerType = GenericProvider.TORRENT

View File

@ -172,6 +172,8 @@ class KATProvider(generic.TorrentProvider):
if not show:
return []
self.show = show
for show_name in set(allPossibleShowNames(show)):
ep_string = show_name + ' S%02d' % int(season) + ' -S%02d' % int(season) + 'E' + ' category:tv' #1) ShowName SXX -SXXE
search_string['Season'].append(ep_string)
@ -184,6 +186,11 @@ class KATProvider(generic.TorrentProvider):
def _get_episode_search_strings(self, show, season, episode, abd=False, add_string=''):
search_string = {'Episode': []}
if not show:
return []
self.show = show
if abd:
for show_name in set(allPossibleShowNames(show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \

View File

@ -177,6 +177,8 @@ class ThePirateBayProvider(generic.TorrentProvider):
if not show:
return []
self.show = show
search_string = {'Season': [], 'Episode': []}
for show_name in set(allPossibleShowNames(show)):
ep_string = show_name + ' S%02d' % int(season) #1) ShowName SXX
@ -193,9 +195,11 @@ class ThePirateBayProvider(generic.TorrentProvider):
search_string = {'Episode': []}
if not episode:
if not show:
return []
self.show = show
if abd:
for show_name in set(allPossibleShowNames(show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \

View File

@ -3166,7 +3166,10 @@ class Home:
continue
epObj.status = int(status)
sql_l.append(epObj.get_sql())
# mass add to database
if epObj.dirty:
sql_l.append(epObj.get_sql())
if len(sql_l) > 0:
myDB = db.DBConnection()