From e414e281576ff65f7c1456a35660cb9044e74508 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 28 Mar 2020 23:37:07 -0400 Subject: [PATCH] Simplify remove function calls --- jellyfin_kodi/full_sync.py | 10 ++++------ jellyfin_kodi/monitor.py | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/jellyfin_kodi/full_sync.py b/jellyfin_kodi/full_sync.py index c96d9b81..6c3ea2b6 100644 --- a/jellyfin_kodi/full_sync.py +++ b/jellyfin_kodi/full_sync.py @@ -530,15 +530,14 @@ class FullSync(object): default_args = (self.server, jellyfindb, kodidb, direct_path) for item in items: if item[1] in ('Series', 'Season', 'Episode'): - obj = TVShows(*default_args).remove + TVShows(*default_args).remove(item[0]) elif item[1] in ('Movie', 'BoxSet'): - obj = Movies(*default_args).remove + Movies(*default_args).remove(item[0]) elif item[1] in ('MusicAlbum', 'MusicArtist', 'AlbumArtist', 'Audio'): - obj = Music(*default_args).remove + Music(*default_args).remove(item[0]) elif item[1] == 'MusicVideo': - obj = MusicVideos(*default_args).remove + MusicVideos(*default_args).remove(item[0]) - obj(item[0]) dialog.update(int((float(count) / float(len(items)) * 100)), heading="%s: %s" % (translate('addon_name'), library[0])) count += 1 @@ -551,7 +550,6 @@ class FullSync(object): self.sync['Whitelist'].remove('Mixed:%s' % library_id) save_sync(self.sync) - xbmc.executebuiltin('ReloadSkin()') def __exit__(self, exc_type, exc_val, exc_tb): diff --git a/jellyfin_kodi/monitor.py b/jellyfin_kodi/monitor.py index 4c966ebf..4adbaef2 100644 --- a/jellyfin_kodi/monitor.py +++ b/jellyfin_kodi/monitor.py @@ -46,7 +46,6 @@ class Monitor(xbmc.Monitor): LOG.info("-->[ kodi scan/%s ]", library) def onScanFinished(self, library): - xbmc.executebuiltin("ReloadSkin()") LOG.info("--<[ kodi scan/%s ]", library) def onNotification(self, sender, method, data):