ListItem pointing to a CUE Sheet
#1
Hi,

if I have a CUE sheet saved in the plugin's addon_data directory, how do I create a ListItem that'll play it once clicked?

I keep getting the following:

Code:
22:02:53.036 T:140736424068032   ERROR: Open - error probing input format, special://profile/addon_data/plugin.audio.bytefm/_content_16_12_26_canteen_1.mp3.cue
22:02:53.036 T:140736424068032   ERROR: Init: Error creating demuxer
22:02:53.036 T:140736424068032   ERROR: CAudioDecoder: Unable to Init Codec while loading file special://profile/addon_data/plugin.audio.bytefm/_content_16_12_26_canteen_1.mp3.cue
22:02:53.036 T:140736424068032 WARNING: PAPlayer::QueueNextFileEx - Failed to create the decoder
22:02:53.036 T:140736424068032   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.audio.bytefm/?action=play&moderators=Christian+Tjaben&broadcast_date=26.12.2016&show_slug=canteen&title=Post-Feiertags-zwischen-den-Jahren-Modus+%2826.12.2016%29]

So it's obviously finding the CUE file, but doesn't know what to do with it. How should I specify that it's an Audio CUE Sheet when I instantiate the ListItem object?
Reply
#2
Put it another way. This works:

Code:
url = 'special://profile/addon_data/{}/{}'.format(PLUGIN_NAME, 'bla.m3u')
xbmc.executebuiltin('xbmc.PlayMedia("{}")'.format(url))

But this doesn't:

Code:
url = 'special://profile/addon_data/{}/{}'.format(PLUGIN_NAME, 'bla.cue')
xbmc.executebuiltin('xbmc.PlayMedia("{}")'.format(url))

Where bla.m3u contains:

Code:
track01.mp3

and bla.cue contains:

Code:
PERFORMER "Markus Schaper"
TITLE "Broadcast from 02.01.2010"
FILE "track01.mp3" MP3
  TRACK 01 AUDIO
    TITLE "A Time To Remember (Remix)"
    PERFORMER "Osunlade"
    INDEX 01 00:10:00
FILE "track01.mp3" MP3
  TRACK 02 AUDIO
    TITLE "Won’t You Open Up Your Senses (Remix)"
    PERFORMER "4 Hero"
    INDEX 01 04:40:00
FILE "track01.mp3" MP3
  TRACK 03 AUDIO
    TITLE "For Corners"
    PERFORMER "Digable Planets"
    INDEX 01 08:20:00
FILE "track01.mp3" MP3
  TRACK 04 AUDIO
    TITLE "Funky Sneakers"
    PERFORMER "Willie Bobo"
    INDEX 01 15:20:00
FILE "track01.mp3" MP3
  TRACK 05 AUDIO
    TITLE "Kudu (Re-Work)"
    PERFORMER "Kyoto Jazz Massive"
    INDEX 01 18:20:00
FILE "track01.mp3" MP3
  TRACK 06 AUDIO
    TITLE "Two Jaguars In Warsaw"
    PERFORMER "Auteur Jazz"
    INDEX 01 23:40:00
FILE "track01.mp3" MP3
  TRACK 07 AUDIO
    TITLE "Heaven (West Coast Vibes Remix)"
    PERFORMER "Bitter:Sweet"
    INDEX 01 27:20:00
FILE "track01.mp3" MP3
  TRACK 08 AUDIO
    TITLE "Jazz Combo feat. José James – All or Nothing At All"
    PERFORMER "Nicola Conte"
    INDEX 01 33:15:00
FILE "track01.mp3" MP3
  TRACK 09 AUDIO
    TITLE "Take Five (Nicola Conte Remix)"
    PERFORMER "Roberto Roena"
    INDEX 01 36:40:00
FILE "track01.mp3" MP3
  TRACK 10 AUDIO
    TITLE "Our Love"
    PERFORMER "Luisito"
    INDEX 01 42:00:00
FILE "track01.mp3" MP3
  TRACK 11 AUDIO
    TITLE "Kerma Elastica (Nicola Conte Remix)"
    PERFORMER "Bobby Hughes Combination"
    INDEX 01 48:38:00
FILE "track01.mp3" MP3
  TRACK 12 AUDIO
    TITLE "Nao Falo Portugues Jazz Rework (feat. Fay Lovsky)"
    PERFORMER "Buscemi"
    INDEX 01 55:15:00

Is there a separate API for playing/loading CUE files? Or am I missing something here?
Reply
#3
Anyone? Beginning to lose hope here Sad
Reply
#4
It's not as easy as that. Kodi doesn't know the .cue format (as far as i know).

You need to read the cue file yourself and parse it into the correct listitem tags, ie:

mylistitems = xbmcgui.ListItem("label string")

Then use : mylistitems.setInfo(), mylistitems.setArt() & mylistitems.setProperty() , ....

This enables you to fill the mylistitems, and you will see that metadata while playing your music.

To play it: xbmc.play(my_music, mylistitems).
Add-on : Bluray iso utils Rewrite of BR_iso_enhancements
Add-on : BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Reply
#5
Thanks for the reply! Finally some light at the end of the tunnel Smile

OK, so I was going about this completely the wrong way. So, in your example, I create a bunch of listitems which correspond to the individual songs in the mp3. Then, I call xbmc.play() with the MP3 as the first argument and the listitems as the second argument.

Is that right?
Reply
#6
I think so. 1 listitem per .mp3. Could be you could do 1 listitem per mp3 playlist, but I haven't done something like that.

Maybe there is some other, better way, but this is how I would try it...
Add-on : Bluray iso utils Rewrite of BR_iso_enhancements
Add-on : BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Reply
#7
1 listitem per mp3?

I'm afraid the MP3 contains multiple tracks - which is why I went about generating a CUE sheet for it.

Looking at the Properties that can be set on a ListItem (http://kodi.wiki/view/InfoLabels#ListItem), I don't see a way to, for example, set the start time for individual tracks contained within a single mp3.
Reply
#8
Try to make a playlist of the .cue file (just a wild idea, don't know for sure this works...).


Alternatively, if the CD is 1 big .mp3, then you can use:

mylistitems.setProperty('StartOffset', str(startplayingfrom))

to set the starttime for individual 'songs' inside one big mp3.


PS: are the mp3's url's (on the net), or are they local? If local, better import them in the musiclibrary...
Add-on : Bluray iso utils Rewrite of BR_iso_enhancements
Add-on : BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Reply

Logout Mark Read Team Forum Stats Members Help
ListItem pointing to a CUE Sheet0