Add verification for music playlist

This commit is contained in:
angelblue05 2018-01-23 17:43:26 -06:00
parent 2a9a022e6e
commit f90d4889e7
1 changed files with 5 additions and 4 deletions

View File

@ -89,7 +89,8 @@ class PlaybackUtils(object):
self.stack[0][1].setPath(self.stack[0][0])
try:
if (not xbmc.getCondVisibility('Window.IsMedia') and
not xbmc.getCondVisibility('Integer.IsGreater(Playlist.Length(video),1)')):
(self.item['Type'] == "Audio" and not xbmc.getCondVisibility('Integer.IsGreater(Playlist.Length(music),1)')) or
(not xbmc.getCondVisibility('Integer.IsGreater(Playlist.Length(video),1)'))):
# widgets do not fill artwork correctly
log.info("Detected widget.")
raise IndexError
@ -146,7 +147,7 @@ class PlaybackUtils(object):
listitem = xbmcgui.ListItem()
url = putils.PlayUtils(intro, listitem).get_play_url()
log.info("Adding Intro: %s" % url)
log.info("Adding Intro: %s", url)
pb = PlaybackUtils(intro)
pb.set_listitem(listitem)
@ -162,7 +163,7 @@ class PlaybackUtils(object):
listitem = xbmcgui.ListItem()
url = putils.PlayUtils(part, listitem).get_play_url()
log.info("Adding additional part: %s" % url)
log.info("Adding additional part: %s", url)
# Set listitem and properties for each additional parts
pb = PlaybackUtils(part)