mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
commit
c29b29a7e7
@ -179,7 +179,7 @@ def change_VERSION_NOTIFY(version_notify):
|
||||
|
||||
sickbeard.VERSION_NOTIFY = version_notify
|
||||
|
||||
if version_notify == False:
|
||||
if not version_notify:
|
||||
sickbeard.NEWEST_VERSION_STRING = None
|
||||
|
||||
if oldSetting == False and version_notify == True:
|
||||
|
@ -146,7 +146,7 @@ def snatchEpisode(result, endStatus=SNATCHED):
|
||||
logger.log(u"Unknown result type, unable to download it", logger.ERROR)
|
||||
dlResult = False
|
||||
|
||||
if dlResult == False:
|
||||
if not dlResult:
|
||||
return False
|
||||
|
||||
if sickbeard.USE_FAILED_DOWNLOADS:
|
||||
|
@ -74,7 +74,7 @@ class BacklogSearcher:
|
||||
else:
|
||||
show_list = sickbeard.showList
|
||||
|
||||
if self.amActive == True:
|
||||
if self.amActive:
|
||||
logger.log(u"Backlog is still running, not starting it again", logger.DEBUG)
|
||||
return
|
||||
|
||||
|
@ -1316,14 +1316,14 @@ class TVEpisode(object):
|
||||
pass
|
||||
|
||||
# if we tried loading it from NFO and didn't find the NFO, try the Indexers
|
||||
if self.hasnfo == False:
|
||||
if not self.hasnfo:
|
||||
try:
|
||||
result = self.loadFromIndexer(season, episode, scene_season, scene_episode)
|
||||
except exceptions.EpisodeDeletedException:
|
||||
result = False
|
||||
|
||||
# if we failed SQL *and* NFO, Indexers then fail
|
||||
if result == False:
|
||||
if not result:
|
||||
raise exceptions.EpisodeNotFoundException(
|
||||
"Couldn't find episode " + str(season) + "x" + str(episode))
|
||||
|
||||
@ -2139,17 +2139,17 @@ class TVEpisode(object):
|
||||
for cur_related_file in related_files:
|
||||
cur_result = helpers.rename_ep_file(cur_related_file, absolute_proper_path,
|
||||
absolute_current_path_no_ext_length)
|
||||
if cur_result == False:
|
||||
if not cur_result:
|
||||
logger.log(str(self.indexerid) + u": Unable to rename file " + cur_related_file, logger.ERROR)
|
||||
|
||||
for cur_related_sub in related_subs:
|
||||
cur_result = helpers.rename_ep_file(cur_related_sub, absolute_proper_subs_path,absolute_current_path_no_ext_length)
|
||||
if cur_result == False:
|
||||
if not cur_result:
|
||||
logger.log(str(self.indexerid) + u": Unable to rename file " + cur_related_sub, logger.ERROR)
|
||||
|
||||
# save the ep
|
||||
with self.lock:
|
||||
if result != False:
|
||||
if result:
|
||||
self.location = absolute_proper_path + file_ext
|
||||
for relEp in self.relatedEps:
|
||||
relEp.location = absolute_proper_path + file_ext
|
||||
|
@ -193,7 +193,7 @@ class Api:
|
||||
else:
|
||||
del kwargs["apikey"]
|
||||
|
||||
if sickbeard.USE_API != True:
|
||||
if not sickbeard.USE_API:
|
||||
msg = u"API :: " + remoteIp + " - SB API Disabled. ACCESS DENIED"
|
||||
return False, msg, args, kwargs
|
||||
elif apiKey == realKey:
|
||||
@ -373,7 +373,7 @@ class ApiCall(object):
|
||||
""" function to check passed params for the shorthand wrapper
|
||||
and to detect missing/required param
|
||||
"""
|
||||
# Fix for applications that send tvdbid instead of indexerid
|
||||
# Fix for applications that send tvdbid instead of indexerid
|
||||
if key == "indexerid" and "indexerid" not in kwargs:
|
||||
key = "tvdbid"
|
||||
|
||||
@ -803,7 +803,7 @@ class CMD_ComingEpisodes(ApiCall):
|
||||
ep["airs"] = str(ep["airs"]).replace('am', ' AM').replace('pm', ' PM').replace(' ', ' ')
|
||||
# start day of the week on 1 (monday)
|
||||
ep["weekday"] = 1 + datetime.date.fromordinal(ordinalAirdate).weekday()
|
||||
# Add tvdbid for backward compability
|
||||
# Add tvdbid for backward compability
|
||||
ep["tvdbid"] = ep['indexerid']
|
||||
|
||||
# TODO: check if this obsolete
|
||||
@ -1170,7 +1170,7 @@ class CMD_History(ApiCall):
|
||||
_rename_element(row, "showid", "indexerid")
|
||||
row["resource_path"] = os.path.dirname(row["resource"])
|
||||
row["resource"] = os.path.basename(row["resource"])
|
||||
# Add tvdbid for backward compability
|
||||
# Add tvdbid for backward compability
|
||||
row['tvdbid'] = row['indexerid']
|
||||
results.append(row)
|
||||
|
||||
@ -1512,7 +1512,7 @@ class CMD_SickBeardPauseBacklog(ApiCall):
|
||||
|
||||
def run(self):
|
||||
""" pause the backlog search """
|
||||
if self.pause == True:
|
||||
if self.pause:
|
||||
sickbeard.searchQueueScheduler.action.pause_backlog() #@UndefinedVariable
|
||||
return _responds(RESULT_SUCCESS, msg="Backlog paused")
|
||||
else:
|
||||
@ -2172,7 +2172,7 @@ class CMD_ShowPause(ApiCall):
|
||||
if not showObj:
|
||||
return _responds(RESULT_FAILURE, msg="Show not found")
|
||||
|
||||
if self.pause == True:
|
||||
if self.pause:
|
||||
showObj.paused = 1
|
||||
return _responds(RESULT_SUCCESS, msg=str(showObj.name) + " has been paused")
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user