Commit ed844831 authored by echel0n's avatar echel0n

Fixed IndexerErrors for TV cache.

Added files to .gitignore related to AniDB.
parent 897dea8e
# SR AniDB Files #
######################
/Session.cfg
/sickrage/libs/adba/anime-list.xml
/sickrage/libs/adba/animetitles.xml
# SR GitLab Files #
######################
/.gitlab/
......
# Changelog
- * 426e231 - 2019-02-24: Release v9.4.75
- * 37a3e12 - 2019-02-24: Fixed IndexerErrors for TV cache. Added files to .gitignore related to AniDB.
- * abe73d7 - 2019-02-24: Release v9.4.75
- * f4b1e65 - 2019-02-24: Fixed issue with scene exceptions not being retrieved. Fixed issues with AniDB and Anime shows. Builds name cache and retrieves exceptions on startup as a background task.
- * 78d6b6e - 2019-02-24: Release v9.4.74
- * b690738 - 2019-02-24: Fixed issue with default add show options and add show year feature.
......
......@@ -184,7 +184,7 @@ class TVCache(object):
def addCacheEntry(self, name, url, seeders, leechers, size):
# check for existing entry in cache
if len([x for x in sickrage.app.cache_db.get_many('providers', self.providerID) if x['url'] == url]):
if len([x for x in sickrage.app.cache_db.get_many('providers', self.providerID) if x.get('url') == url]):
return
# ignore invalid and private IP address urls
......@@ -192,7 +192,7 @@ class TVCache(object):
if not url.startswith('magnet'):
return
elif is_ip_private(url.split(r'//')[-1].split(r'/')[0]):
return
return
try:
# parse release name
......@@ -263,8 +263,9 @@ class TVCache(object):
dbData += [x for x in sickrage.app.cache_db.get_many('providers', self.providerID)]
# for each cache entry
for curResult in (x for x in dbData if x['indexerid'] == ep_obj.show.indexerid and x['season'] == season
and "|" + str(episode) + "|" in x['episodes']):
for curResult in (x for x in dbData if
x.get('indexerid') == ep_obj.show.indexerid and x.get('season') == season and "|{}|".format(
episode) in x.get('episodes', [])):
result = self.provider.getResult()
# ignore invalid and private IP address urls
......@@ -272,7 +273,7 @@ class TVCache(object):
if not curResult["url"].startswith('magnet'):
continue
elif is_ip_private(curResult["url"].split(r'//')[-1].split(r'/')[0]):
continue
continue
# ignored/required words, and non-tv junk
if not show_names.filterBadReleases(curResult["name"]):
......
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