mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 18:26:15 +00:00
Add verification for music playlist
This commit is contained in:
parent
2a9a022e6e
commit
f90d4889e7
1 changed files with 5 additions and 4 deletions
|
@ -88,8 +88,9 @@ class PlaybackUtils(object):
|
||||||
# Stack: [(url, listitem), (url, ...), ...]
|
# Stack: [(url, listitem), (url, ...), ...]
|
||||||
self.stack[0][1].setPath(self.stack[0][0])
|
self.stack[0][1].setPath(self.stack[0][0])
|
||||||
try:
|
try:
|
||||||
if (not xbmc.getCondVisibility('Window.IsMedia') and
|
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
|
# widgets do not fill artwork correctly
|
||||||
log.info("Detected widget.")
|
log.info("Detected widget.")
|
||||||
raise IndexError
|
raise IndexError
|
||||||
|
@ -146,7 +147,7 @@ class PlaybackUtils(object):
|
||||||
|
|
||||||
listitem = xbmcgui.ListItem()
|
listitem = xbmcgui.ListItem()
|
||||||
url = putils.PlayUtils(intro, listitem).get_play_url()
|
url = putils.PlayUtils(intro, listitem).get_play_url()
|
||||||
log.info("Adding Intro: %s" % url)
|
log.info("Adding Intro: %s", url)
|
||||||
|
|
||||||
pb = PlaybackUtils(intro)
|
pb = PlaybackUtils(intro)
|
||||||
pb.set_listitem(listitem)
|
pb.set_listitem(listitem)
|
||||||
|
@ -162,7 +163,7 @@ class PlaybackUtils(object):
|
||||||
|
|
||||||
listitem = xbmcgui.ListItem()
|
listitem = xbmcgui.ListItem()
|
||||||
url = putils.PlayUtils(part, listitem).get_play_url()
|
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
|
# Set listitem and properties for each additional parts
|
||||||
pb = PlaybackUtils(part)
|
pb = PlaybackUtils(part)
|
||||||
|
|
Loading…
Reference in a new issue