mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Fix for sql mass add issues.
Fix for KAT and TPB providers. Fix for Newznab providers.
This commit is contained in:
parent
12ca73bb0e
commit
fb0339a274
4 changed files with 17 additions and 3 deletions
|
@ -381,4 +381,4 @@ class TorrentProvider(GenericProvider):
|
|||
def __init__(self, name):
|
||||
GenericProvider.__init__(self, name)
|
||||
|
||||
self.providerType = GenericProvider.TORRENT
|
||||
self.providerType = GenericProvider.TORRENT
|
||||
|
|
|
@ -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) + ' ' + \
|
||||
|
|
|
@ -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) + ' ' + \
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue