Rename variable

This commit is contained in:
tomkat83 2016-09-04 18:30:06 +02:00
parent 2c1ad607cd
commit 0403e77021

View file

@ -90,10 +90,10 @@ class PlaybackUtils():
############### ORGANIZE CURRENT PLAYLIST ################ ############### ORGANIZE CURRENT PLAYLIST ################
homeScreen = xbmc.getCondVisibility('Window.IsActive(home)') homeScreen = xbmc.getCondVisibility('Window.IsActive(home)')
playlist = self.pl.playlist kodiPl = self.pl.playlist
# Can return -1 # Can return -1
startPos = max(playlist.getposition(), 0) startPos = max(kodiPl.getposition(), 0)
sizePlaylist = playlist.size() sizePlaylist = kodiPl.size()
self.currentPosition = startPos self.currentPosition = startPos
propertiesPlayback = window('plex_playbackProps') == "true" propertiesPlayback = window('plex_playbackProps') == "true"
@ -118,7 +118,7 @@ class PlaybackUtils():
window('plex_customplaylist') != "true"): window('plex_customplaylist') != "true"):
log.debug("Adding dummy file to playlist.") log.debug("Adding dummy file to playlist.")
dummyPlaylist = True dummyPlaylist = True
playlist.add(playurl, listitem, index=startPos) kodiPl.add(playurl, listitem, index=startPos)
# Remove the original item from playlist # Remove the original item from playlist
self.pl.removefromPlaylist(startPos+1) self.pl.removefromPlaylist(startPos+1)
# Readd the original item to playlist - via jsonrpc so we have full metadata # Readd the original item to playlist - via jsonrpc so we have full metadata
@ -169,7 +169,8 @@ class PlaybackUtils():
# NEW to Plex # NEW to Plex
API.CreateListItemFromPlexItem(additionalListItem) API.CreateListItemFromPlexItem(additionalListItem)
playlist.add(additionalPlayurl, additionalListItem, index=self.currentPosition) kodiPl.add(additionalPlayurl, additionalListItem,
index=self.currentPosition)
self.pl.verifyPlaylist() self.pl.verifyPlaylist()
self.currentPosition += 1 self.currentPosition += 1
API.setPartNumber = 0 API.setPartNumber = 0
@ -207,7 +208,7 @@ class PlaybackUtils():
(homeScreen and not sizePlaylist)): (homeScreen and not sizePlaylist)):
# Playlist was created just now, play it. # Playlist was created just now, play it.
log.info("Play playlist.") log.info("Play playlist.")
xbmc.Player().play(playlist, startpos=startPos) xbmc.Player().play(kodiPl, startpos=startPos)
else: else:
log.info("Play as a regular item.") log.info("Play as a regular item.")