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: except Queue.Empty:
break break
try:
if item['Type'] == 'Movie': if item['Type'] == 'Movie':
obj = Movies(self.args[0], jellyfindb, kodidb, self.args[1]).userdata(item) obj = Movies(self.args[0], jellyfindb, kodidb, self.args[1]).userdata(item)
elif item['Type'] in ['Series', 'Season', 'Episode']: elif item['Type'] in ['Series', 'Season', 'Episode']:
obj = TVShows(self.args[0], jellyfindb, kodidb, self.args[1]).userdata(item) obj = TVShows(self.args[0], jellyfindb, kodidb, self.args[1]).userdata(item)
elif item['Type'] == 'MusicAlbum': 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': 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': 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': elif item['Type'] == 'Audio':
obj = Music(self.args[0], jellyfindb, kodidb, self.args[1]).song obj = Music(self.args[0], jellyfindb, kodidb, self.args[1]).song(item)
try:
obj(item)
except LibraryException as error: except LibraryException as error:
if error.status == 'StopCalled': if error.status == 'StopCalled':
break break