mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 11:32:20 -05:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
dc867d049b
@ -373,6 +373,10 @@ class ApiCall(object):
|
|||||||
""" function to check passed params for the shorthand wrapper
|
""" function to check passed params for the shorthand wrapper
|
||||||
and to detect missing/required param
|
and to detect missing/required param
|
||||||
"""
|
"""
|
||||||
|
# Fix for applications that send tvdbid instead of indexerid
|
||||||
|
if key == "indexerid" and "indexerid" not in kwargs:
|
||||||
|
key = "tvdbid"
|
||||||
|
|
||||||
missing = True
|
missing = True
|
||||||
orgDefault = default
|
orgDefault = default
|
||||||
|
|
||||||
@ -799,6 +803,8 @@ class CMD_ComingEpisodes(ApiCall):
|
|||||||
ep["airs"] = str(ep["airs"]).replace('am', ' AM').replace('pm', ' PM').replace(' ', ' ')
|
ep["airs"] = str(ep["airs"]).replace('am', ' AM').replace('pm', ' PM').replace(' ', ' ')
|
||||||
# start day of the week on 1 (monday)
|
# start day of the week on 1 (monday)
|
||||||
ep["weekday"] = 1 + datetime.date.fromordinal(ordinalAirdate).weekday()
|
ep["weekday"] = 1 + datetime.date.fromordinal(ordinalAirdate).weekday()
|
||||||
|
# Add tvdbid for backward compability
|
||||||
|
ep["tvdbid"] = ep['indexerid']
|
||||||
|
|
||||||
# TODO: check if this obsolete
|
# TODO: check if this obsolete
|
||||||
if not status in finalEpResults:
|
if not status in finalEpResults:
|
||||||
@ -1164,6 +1170,8 @@ class CMD_History(ApiCall):
|
|||||||
_rename_element(row, "showid", "indexerid")
|
_rename_element(row, "showid", "indexerid")
|
||||||
row["resource_path"] = os.path.dirname(row["resource"])
|
row["resource_path"] = os.path.dirname(row["resource"])
|
||||||
row["resource"] = os.path.basename(row["resource"])
|
row["resource"] = os.path.basename(row["resource"])
|
||||||
|
# Add tvdbid for backward compability
|
||||||
|
ep["tvdbid"] = ep['indexerid']
|
||||||
results.append(row)
|
results.append(row)
|
||||||
|
|
||||||
myDB.connection.close()
|
myDB.connection.close()
|
||||||
@ -1592,6 +1600,7 @@ class CMD_SickBeardSearchIndexers(ApiCall):
|
|||||||
results = []
|
results = []
|
||||||
for curSeries in series:
|
for curSeries in series:
|
||||||
results.append({"indexerid": int(curSeries.findtext('seriesid')),
|
results.append({"indexerid": int(curSeries.findtext('seriesid')),
|
||||||
|
"tvdbid": int(curSeries.findtext('seriesid')),
|
||||||
"name": curSeries.findtext('SeriesName'),
|
"name": curSeries.findtext('SeriesName'),
|
||||||
"first_aired": curSeries.findtext('FirstAired')})
|
"first_aired": curSeries.findtext('FirstAired')})
|
||||||
|
|
||||||
@ -1622,6 +1631,7 @@ class CMD_SickBeardSearchIndexers(ApiCall):
|
|||||||
return _responds(RESULT_FAILURE, msg="Show contains no name, invalid result")
|
return _responds(RESULT_FAILURE, msg="Show contains no name, invalid result")
|
||||||
|
|
||||||
showOut = [{"indexerid": self.indexerid,
|
showOut = [{"indexerid": self.indexerid,
|
||||||
|
"tvdbid": self.indexerid,
|
||||||
"name": unicode(myShow.data['seriesname']),
|
"name": unicode(myShow.data['seriesname']),
|
||||||
"first_aired": myShow.data['firstaired']}]
|
"first_aired": myShow.data['firstaired']}]
|
||||||
|
|
||||||
@ -2529,6 +2539,7 @@ class CMD_Shows(ApiCall):
|
|||||||
"air_by_date": curShow.air_by_date,
|
"air_by_date": curShow.air_by_date,
|
||||||
"sports": curShow.sports,
|
"sports": curShow.sports,
|
||||||
"indexerid": curShow.indexerid,
|
"indexerid": curShow.indexerid,
|
||||||
|
"tvdbid": curShow.indexerid,
|
||||||
"network": curShow.network,
|
"network": curShow.network,
|
||||||
"show_name": curShow.name,
|
"show_name": curShow.name,
|
||||||
"status": curShow.status,
|
"status": curShow.status,
|
||||||
|
Loading…
Reference in New Issue
Block a user