mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Simplify remove function calls
This commit is contained in:
parent
a96877f34d
commit
e414e28157
2 changed files with 4 additions and 7 deletions
|
@ -530,15 +530,14 @@ class FullSync(object):
|
||||||
default_args = (self.server, jellyfindb, kodidb, direct_path)
|
default_args = (self.server, jellyfindb, kodidb, direct_path)
|
||||||
for item in items:
|
for item in items:
|
||||||
if item[1] in ('Series', 'Season', 'Episode'):
|
if item[1] in ('Series', 'Season', 'Episode'):
|
||||||
obj = TVShows(*default_args).remove
|
TVShows(*default_args).remove(item[0])
|
||||||
elif item[1] in ('Movie', 'BoxSet'):
|
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'):
|
elif item[1] in ('MusicAlbum', 'MusicArtist', 'AlbumArtist', 'Audio'):
|
||||||
obj = Music(*default_args).remove
|
Music(*default_args).remove(item[0])
|
||||||
elif item[1] == 'MusicVideo':
|
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]))
|
dialog.update(int((float(count) / float(len(items)) * 100)), heading="%s: %s" % (translate('addon_name'), library[0]))
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
|
@ -551,7 +550,6 @@ class FullSync(object):
|
||||||
self.sync['Whitelist'].remove('Mixed:%s' % library_id)
|
self.sync['Whitelist'].remove('Mixed:%s' % library_id)
|
||||||
|
|
||||||
save_sync(self.sync)
|
save_sync(self.sync)
|
||||||
xbmc.executebuiltin('ReloadSkin()')
|
|
||||||
|
|
||||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,6 @@ class Monitor(xbmc.Monitor):
|
||||||
LOG.info("-->[ kodi scan/%s ]", library)
|
LOG.info("-->[ kodi scan/%s ]", library)
|
||||||
|
|
||||||
def onScanFinished(self, library):
|
def onScanFinished(self, library):
|
||||||
xbmc.executebuiltin("ReloadSkin()")
|
|
||||||
LOG.info("--<[ kodi scan/%s ]", library)
|
LOG.info("--<[ kodi scan/%s ]", library)
|
||||||
|
|
||||||
def onNotification(self, sender, method, data):
|
def onNotification(self, sender, method, data):
|
||||||
|
|
Loading…
Reference in a new issue