From 5a2d3f4238b923be7e6bf916ef9c304d3f5c2bb0 Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 10 Mar 2018 15:03:31 +0100 Subject: [PATCH] Optimize code --- resources/lib/itemtypes.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index fdda7342..1aaf08cf 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -754,20 +754,15 @@ class TVShows(Items): LOG.error('Could not find parent tv show for season %s. ' 'Skipping season for now.', plex_id) return - seasonid = self.kodi_db.add_season(showid, seasonnum) checksum = api.checksum() # Check whether Season already exists plex_dbitem = plex_db.getItem_byId(plex_id) update_item = False if plex_dbitem is None else True - - # Process artwork - allartworks = api.artwork() - artwork.modify_artwork(allartworks, + artwork.modify_artwork(api.artwork(), seasonid, v.KODI_TYPE_SEASON, kodicursor) - if update_item: # Update a reference: checksum in plex table plex_db.updateReference(plex_id, checksum)