Don't find ancestors on userdata updates

This commit is contained in:
Matt 2020-08-12 21:04:05 -04:00
parent 29c2f6126a
commit 75ac8ef1b8

View file

@ -672,28 +672,25 @@ class UserDataWorker(threading.Thread):
except Queue.Empty: except Queue.Empty:
break break
# Verify that the updated item is in our local whitelist default_args = (self.server, jellyfindb, kodidb, self.direct_path)
library = find_library(self.server, item) try:
if library: if item['Type'] == 'Movie':
default_args = (self.server, jellyfindb, kodidb, self.direct_path, library) Movies(*default_args).userdata(item)
try: elif item['Type'] in ['Series', 'Season', 'Episode']:
if item['Type'] == 'Movie': TVShows(*default_args).userdata(item)
Movies(*default_args).userdata(item) elif item['Type'] == 'MusicAlbum':
elif item['Type'] in ['Series', 'Season', 'Episode']: Music(*default_args).album(item)
TVShows(*default_args).userdata(item) elif item['Type'] == 'MusicArtist':
elif item['Type'] == 'MusicAlbum': Music(*default_args).artist(item)
Music(*default_args).album(item) elif item['Type'] == 'AlbumArtist':
elif item['Type'] == 'MusicArtist': Music(*default_args).albumartist(item)
Music(*default_args).artist(item) elif item['Type'] == 'Audio':
elif item['Type'] == 'AlbumArtist': Music(*default_args).userdata(item)
Music(*default_args).albumartist(item) except LibraryException as error:
elif item['Type'] == 'Audio': if error.status == 'StopCalled':
Music(*default_args).song(item) break
except LibraryException as error: except Exception as error:
if error.status == 'StopCalled': LOG.exception(error)
break
except Exception as error:
LOG.exception(error)
self.queue.task_done() self.queue.task_done()