Commit 063405bd authored by echel0n's avatar echel0n
Browse files

Fixed issue with provider cache and series provider id enum's

parent 22e72ff0
......@@ -281,20 +281,24 @@ class TVCache(object):
season=season).filter(CacheDB.Provider.episodes.contains("|{}|".format(episode)))]
for curResult in dbData:
result = self.provider.get_result()
result.series_id = int(curResult["series_id"])
result.series_provider_id = curResult["series_provider_id"]
# convert to series provider id enum
if not isinstance(result.series_provider_id, SeriesProviderID):
result.series_provider_id = SeriesProviderID[curResult["series_provider_id"]]
# get series, if it's not one of our shows then ignore it
series = find_show(int(curResult["series_id"]), SeriesProviderID[curResult["series_provider_id"]])
series = find_show(result.series_id, result.series_provider_id)
if not series or series.series_provider_id != series_provider_id:
continue
result = self.provider.get_result()
# ignored/required words, and non-tv junk
if not show_names.filter_bad_releases(curResult["name"]):
continue
result.series_id = int(curResult["series_id"])
result.series_provider_id = SeriesProviderID[curResult["series_provider_id"]]
# skip if provider is anime only and show is not anime
if self.provider.anime_only and not series.is_anime:
sickrage.app.log.debug("" + str(series.name) + " is not an anime, skiping")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment