From f90d4889e7bedc79bbc98a9a796732a749d48c80 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Tue, 23 Jan 2018 17:43:26 -0600 Subject: [PATCH] Add verification for music playlist --- resources/lib/playbackutils.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/lib/playbackutils.py b/resources/lib/playbackutils.py index 17aa8ced..b78c50a7 100644 --- a/resources/lib/playbackutils.py +++ b/resources/lib/playbackutils.py @@ -88,8 +88,9 @@ class PlaybackUtils(object): # Stack: [(url, listitem), (url, ...), ...] 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)')): + if (not xbmc.getCondVisibility('Window.IsMedia') and + (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)