Rename variable

This commit is contained in:
Croneter 2018-05-03 07:53:28 +02:00
parent a8d02bffdc
commit f5a457a87d

View file

@ -313,7 +313,7 @@ class LibrarySync(Thread):
# Prevent duplicate for nodes of the same type # Prevent duplicate for nodes of the same type
nodes = self.nodes[mediatype] nodes = self.nodes[mediatype]
# Prevent duplicate for playlists of the same type # Prevent duplicate for playlists of the same type
playlists = self.playlists[mediatype] lists = self.playlists[mediatype]
sorted_views = self.sorted_views sorted_views = self.sorted_views
folderid = folder['key'] folderid = folder['key']
@ -330,10 +330,10 @@ class LibrarySync(Thread):
LOG.info('Creating viewid: %s in Plex database.', folderid) LOG.info('Creating viewid: %s in Plex database.', folderid)
tagid = kodi_db.createTag(foldername) tagid = kodi_db.createTag(foldername)
# Create playlist for the video library # Create playlist for the video library
if (foldername not in playlists and if (foldername not in lists and
mediatype in (v.PLEX_TYPE_MOVIE, v.PLEX_TYPE_SHOW)): mediatype in (v.PLEX_TYPE_MOVIE, v.PLEX_TYPE_SHOW)):
utils.playlist_xsp(mediatype, foldername, folderid, viewtype) utils.playlist_xsp(mediatype, foldername, folderid, viewtype)
playlists.append(foldername) lists.append(foldername)
# Create the video node # Create the video node
if (foldername not in nodes and if (foldername not in nodes and
mediatype != v.PLEX_TYPE_ARTIST): mediatype != v.PLEX_TYPE_ARTIST):
@ -388,13 +388,13 @@ class LibrarySync(Thread):
viewid=folderid, viewid=folderid,
delete=True) delete=True)
# Added new playlist # Added new playlist
if (foldername not in playlists and mediatype in if (foldername not in lists and mediatype in
(v.PLEX_TYPE_MOVIE, v.PLEX_TYPE_SHOW)): (v.PLEX_TYPE_MOVIE, v.PLEX_TYPE_SHOW)):
utils.playlist_xsp(mediatype, utils.playlist_xsp(mediatype,
foldername, foldername,
folderid, folderid,
viewtype) viewtype)
playlists.append(foldername) lists.append(foldername)
# Add new video node # Add new video node
if foldername not in nodes and mediatype != "musicvideos": if foldername not in nodes and mediatype != "musicvideos":
vnodes.viewNode(sorted_views.index(foldername), vnodes.viewNode(sorted_views.index(foldername),
@ -414,13 +414,13 @@ class LibrarySync(Thread):
else: else:
# Validate the playlist exists or recreate it # Validate the playlist exists or recreate it
if mediatype != v.PLEX_TYPE_ARTIST: if mediatype != v.PLEX_TYPE_ARTIST:
if (foldername not in playlists and mediatype in if (foldername not in lists and mediatype in
(v.PLEX_TYPE_MOVIE, v.PLEX_TYPE_SHOW)): (v.PLEX_TYPE_MOVIE, v.PLEX_TYPE_SHOW)):
utils.playlist_xsp(mediatype, utils.playlist_xsp(mediatype,
foldername, foldername,
folderid, folderid,
viewtype) viewtype)
playlists.append(foldername) lists.append(foldername)
# Create the video node if not already exists # Create the video node if not already exists
if foldername not in nodes and mediatype != "musicvideos": if foldername not in nodes and mediatype != "musicvideos":
vnodes.viewNode(sorted_views.index(foldername), vnodes.viewNode(sorted_views.index(foldername),