httpAPI to have unique id for each song
#1
the httpapi are based on having the media url as key when adding, playing removing songs from the playlist which is not good because it is not unique.
For example, what if i have the same song two times in a playlist. Removing by filename will remove it at both places.
When getting current playlist you should get an xml response where each song has a couple of tags such as path, song id, etc

If it sound complex, it should be possible when adding a new song to the playlist, also sending in a guid to make the song unique and also return the guid when getting the playlist. same for removal etc.
Reply
#2
good point.

"addtoplaylist" takes a full file path as the parameter but this makes sense.

"removefromplaylist" should take an index number or a file path. where the index number is the playlist item index.

this means "getplaylistcontents" needs to return the index along with the file paths. this is doable. it can be modified do work like this: getplaylistcontents&parameter=[PLAYLIST];showindex

if it sees "withindex" the output would be returned differently as html list in this format: <li>index;path
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
i've made these changes to "removefromplaylist" and "getplaylistcontents" in the http api. they'll be in svn in the linuxport branch soon.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
httpAPI to have unique id for each song0