Merge pull request #211 from mcarlton00/once-more-with-feeling

More getitem cleanup in library
This commit is contained in:
Abby 2020-02-26 23:07:12 +00:00 committed by GitHub
commit 43f0c57ffd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -675,21 +675,20 @@ class UserDataWorker(threading.Thread):
except Queue.Empty:
break
try:
if item['Type'] == 'Movie':
obj = Movies(self.args[0], jellyfindb, kodidb, self.args[1]).userdata(item)
elif item['Type'] in ['Series', 'Season', 'Episode']:
obj = TVShows(self.args[0], jellyfindb, kodidb, self.args[1]).userdata(item)
elif item['Type'] == 'MusicAlbum':
obj = Music(self.args[0], jellyfindb, kodidb, self.args[1]).album
obj = Music(self.args[0], jellyfindb, kodidb, self.args[1]).album(item)
elif item['Type'] == 'MusicArtist':
obj = Music(self.args[0], jellyfindb, kodidb, self.args[1]).artist
obj = Music(self.args[0], jellyfindb, kodidb, self.args[1]).artist(item)
elif item['Type'] == 'AlbumArtist':
obj = Music(self.args[0], jellyfindb, kodidb, self.args[1]).albumartist
obj = Music(self.args[0], jellyfindb, kodidb, self.args[1]).albumartist(item)
elif item['Type'] == 'Audio':
obj = Music(self.args[0], jellyfindb, kodidb, self.args[1]).song
try:
obj(item)
obj = Music(self.args[0], jellyfindb, kodidb, self.args[1]).song(item)
except LibraryException as error:
if error.status == 'StopCalled':
break