ListItem.setInfo causing codec fustercluck?
#1
Hello world!

I'm developing a plugin that streams audio from a REST API. The essential info I need to provide you with to explain my problem is that my plugin makes API calls through regular HTTP to this server and when the call is a GET request for a file it plays in XBMC.

The audio I'm testing with is comprised of mostly FLAC but also some MP3 and M4A (?).

Now, the issue:

metaDataDict is a dictionary that I generate to contain metadata about the songs that I list. The data is gathered from a JSON result of an API call. Here is the dictionary for a song that I print to the log to see the values:

Code:
{'album': 'Blazing Arrow', 'genre': 'Hip-Hop', 'artist': 'Blackalicious', 'year': 2002, 'title': u'Make You Feel That Way'}

So I know the data is there and I see the song title in the actual XBMC GUI. Here is the code I use for all my ListItems:

Code:
li = xbmcgui.ListItem(metaDataDict['title'], iconImage='DefaultAudio.png')
li.setInfo(type='music', infoLabels = metaDataDict)

This is what it looks like when I play an MP3:

Image

Looks great! Now let's FLAC this beast:

Code:
12:30:53 T:140735279117056   ERROR: CAudioDecoder: Unable to Init Codec while loading file http://192.168.1.5:8337/item/19/file
12:30:53 T:140735279117056 WARNING: PAPlayer::QueueNextFileEx - Failed to create the decoder
12:30:53 T:140735279117056   ERROR: Playlist Player: skipping unplayable item: 0, path [http://192.168.1.5:8337/item/19/file]

It does this for every song presented in the current list and in XBMC it tells me it's unable to find the next item in the queue. Wut? If I comment out the row that does li.setInfo:

Image

The song plays but in the player modal I see it as file and no metadata is showing.

I googled the error and it seems people have had similar issues with OGG. They solved it with a patch. Is there no way I can stream FLAC with metadata without patching XBMC? I want the plugin to work out of the box. I'd rather not have my users depend on their degree in computer science to install a plugin.

What is causing this and how do I fix it?

[EDIT]

I thought I'd mention that I am developing on OS X 10.10 Yosemite and I'm running Kodi 14.1.
I get the exact same errors on OpenELEC 5.0.3 with Kodi 14.1.

[EDIT 2]

It seems to be a problem with PAPlayer. I tried switching the default audio player to DVDPlayer and it works like a charm. Any idea when this will be fixed? This has been a very frustrating investigation process.
Reply

Logout Mark Read Team Forum Stats Members Help
ListItem.setInfo causing codec fustercluck?0