diff --git a/CHANGES.md b/CHANGES.md index 58f19f1..9ad1aa2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ ### 0.21.19 (2019-03-08 15:45:00 UTC) * Change update provider TL from v4/classic to V5 +* Fix webapi (add show) wrong error message if show is not at info source ### 0.21.18 (2020-03-04 19:20:00 UTC) diff --git a/sickbeard/webapi.py b/sickbeard/webapi.py index 778e8ed..ab4f2a8 100644 --- a/sickbeard/webapi.py +++ b/sickbeard/webapi.py @@ -3242,9 +3242,9 @@ class CMD_SickGearShowAddExisting(ApiCall): raise e indexerName = None - if not myShow.data['seriesname']: + if None is myShow or getattr(t, 'show_not_found', False) or not myShow.data['seriesname']: self.log( - u"Found show with tvid " + str(self.tvid) + " prodid " + str(self.prodid) + ", however it contained no show name", + "Found show with tvid %s prodid %s, however it contained no show name" % (self.tvid, self.prodid), logger.DEBUG) return _responds(RESULT_FAILURE, msg="Unable to retrieve information from indexer") @@ -3405,9 +3405,9 @@ class CMD_SickGearShowAddNew(ApiCall): raise e indexerName = None - if not myShow.data['seriesname']: + if None is myShow or getattr(t, 'show_not_found', False) or not myShow.data['seriesname']: self.log( - u"Found show with tvid " + self.tvid + " prodid " + str(self.prodid) + ", however it contained no show name", + "Found show with tvid %s prodid %s, however it contained no show name" % (self.tvid, self.prodid), logger.DEBUG) return _responds(RESULT_FAILURE, msg="Unable to retrieve information from indexer")