Commit 97c55696 authored by echel0n's avatar echel0n

Refactored `delete_episode` method to remove episode object from related show episode cache.

parent c0460175
......@@ -570,9 +570,9 @@ class Core(object):
try:'Loading show {} and building caches'.format(
show = TVShow(show.indexer_id, show.indexer)
self.shows.update({(show.indexer_id, show.indexer): show})
self.shows.update({(show.indexer_id, show.indexer): show})
except Exception as e:
self.log.debug('There was an error loading show: {}'.format(
......@@ -664,6 +664,12 @@ class TVEpisode(object):'Unable to delete episode file %s: %s / %s' % (self.location, repr(e), str(e)))
# delete myself from show episode cache
ep_index ="Deleting %s S%02dE%02d from the shows episode cache" % (, self.season or 0, self.episode or 0))
except ValueError:
# delete myself from the database"Deleting %s S%02dE%02d from the DB" % (, self.season or 0, self.episode or 0))
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