Fix undefined variable in remove function

This commit is contained in:
Matt 2020-08-02 19:12:15 -04:00
parent 4178f0a362
commit 7f012dc8b0
5 changed files with 8 additions and 8 deletions

View file

@ -772,13 +772,13 @@ class RemovedWorker(threading.Thread):
break break
if item['Type'] == 'Movie': if item['Type'] == 'Movie':
obj = Movies(self.args[0], jellyfindb, kodidb, self.args[1], library).remove obj = Movies(self.args[0], jellyfindb, kodidb, self.args[1]).remove
elif item['Type'] in ['Series', 'Season', 'Episode']: elif item['Type'] in ['Series', 'Season', 'Episode']:
obj = TVShows(self.args[0], jellyfindb, kodidb, self.args[1], library).remove obj = TVShows(self.args[0], jellyfindb, kodidb, self.args[1]).remove
elif item['Type'] in ['MusicAlbum', 'MusicArtist', 'AlbumArtist', 'Audio']: elif item['Type'] in ['MusicAlbum', 'MusicArtist', 'AlbumArtist', 'Audio']:
obj = Music(self.args[0], jellyfindb, kodidb, self.args[1], library).remove obj = Music(self.args[0], jellyfindb, kodidb, self.args[1]).remove
elif item['Type'] == 'MusicVideo': elif item['Type'] == 'MusicVideo':
obj = MusicVideos(self.args[0], jellyfindb, kodidb, self.args[1], library).remove obj = MusicVideos(self.args[0], jellyfindb, kodidb, self.args[1]).remove
try: try:
obj(item['Id']) obj(item['Id'])

View file

@ -24,7 +24,7 @@ LOG = LazyLogger(__name__)
class Movies(KodiDb): class Movies(KodiDb):
def __init__(self, server, jellyfindb, videodb, direct_path, library): def __init__(self, server, jellyfindb, videodb, direct_path, library=None):
self.server = server self.server = server
self.jellyfin = jellyfindb self.jellyfin = jellyfindb

View file

@ -22,7 +22,7 @@ LOG = LazyLogger(__name__)
class Music(KodiDb): class Music(KodiDb):
def __init__(self, server, jellyfindb, musicdb, direct_path, library): def __init__(self, server, jellyfindb, musicdb, direct_path, library=None):
self.server = server self.server = server
self.jellyfin = jellyfindb self.jellyfin = jellyfindb

View file

@ -26,7 +26,7 @@ LOG = LazyLogger(__name__)
class MusicVideos(KodiDb): class MusicVideos(KodiDb):
def __init__(self, server, jellyfindb, videodb, direct_path, library): def __init__(self, server, jellyfindb, videodb, direct_path, library=None):
self.server = server self.server = server
self.jellyfin = jellyfindb self.jellyfin = jellyfindb

View file

@ -27,7 +27,7 @@ LOG = LazyLogger(__name__)
class TVShows(KodiDb): class TVShows(KodiDb):
def __init__(self, server, jellyfindb, videodb, direct_path, library, update_library=False): def __init__(self, server, jellyfindb, videodb, direct_path, library=None, update_library=False):
self.server = server self.server = server
self.jellyfin = jellyfindb self.jellyfin = jellyfindb