[Playlist] question about the XSPF specs

Benoît Gréant gordie.lachance at gmail.com
Mon Sep 14 18:26:47 UTC 2020


Hi everyone,
I'm coming back about the XSPF/JSPF specs !

I (still) would like to use it as the backbone of a chain of services i'm
building.

Among others, I would like to be able to add multiple streaming links for
each track.
There might be several different links for a same service, so I guess that
the *identifier* element would be disqualified here.
Youtube, for instance, may have several instances of the same track, so it
has no unique ID as Musicbrainz would have.
Lucas Gonze said here <https://stackoverflow.com/a/60836001/782013> that I
should use the info element, but it's not very clear.

I would like something like this

"sources": [
> 'https://open.spotify.com/track/3FgDF8tNn6aqB7ycygy7ch',
> 'https://www.youtube.com/watch?v=PA3P1-aSvKQ',
> 'https://www.youtube.com/watch?v=vUes9-tFWm4',
> ]


or, maybe even better, be able to add some informations (like the titles,
the date, the available countries...) about those sources :

"sources": [
> {
> url:'https://open.spotify.com/track/3FgDF8tNn6aqB7ycygy7ch',
> 'title:'les sardines',
> 'available':'USA,belgium,france'
> },
> {
> url:'https://www.youtube.com/watch?v=PA3P1-aSvKQ',
> title:'les sardines',
> available':'USA,belgium,france'
> } ,
> {
> url:'https://www.youtube.com/watch?v=vUes9-tFWm4',
> title:'les sardines live',
> available:'USA,belgium,france'
> }
> ],


Another thing I wonder is how to add custom metas for a track or a
playlist. Let's say I have an API called wpsstmapi.

Could I do something like this ?

     "meta"          : [
       {'wpsstmapi/input_url'=> 'myvalue1'},
       {'wpsstmapi/xspf_url'=> 'myvalue2'},
       {'wpsstmapi/importer_slug'=> 'myvalue3'},
     ],

In the specs, the keys are urls like http://example.com/rel/1/. Should this
point to an URL that exists or can I use what I want ?

Well, I think that XSPF.JSPF is a wonderful standard.
But there is several things I don't get, like where I can set the URLs
above, or when/how to use the link,meta,extension attributes.
Would someone be kind enough to help me here ?
And eventually would it be conceivable to upgrade the specs ?  A lot of
stuff has changed since they were made...

Thanks a lot!

Benoît


Le mar. 24 mars 2020 à 18:19, Benoît Gréant <gordie.lachance at gmail.com> a
écrit :

> Hi and thanks for your kind reply.
>
> I understand why the identifier can work for a spotify track, but is it
> relevant for a youtube link too ?
> I mean, there might be several different Youtube videos for a same track.
> Which, then, is no more an ID, is it ?
>
> Thanks !
>
> B
>
> Le mar. 24 mars 2020 à 18:17, Lucas Gonze <lucas at gonze.com> a écrit :
>
>> After reading your more detailed issue description on Stack Overflow, I
>> have posted this answer there.
>>
>> You should use the identifier element (
>> http://xspf.org/xspf-v1.html#rfc.section.4.1.1.2.14.1.1.1.2) for things
>> like Spotify links.
>>
>> The info element can also do what you need (
>> http://xspf.org/xspf-v1.html#rfc.section.4.1.1.2.14.1.1.1.6), but you
>> can only have one per track, so you couldn't cover more than one streaming
>> service.
>>
>> Regarding the many years since the last update of the spec, maybe it's
>> time to work on one. A blessed JSON version would be useful.
>>
>> It's productive to discover that the spec is not clearly communicating
>> this information. In the time we wrote the spec most functioning Internet
>> music was an MP3 on a web server. Now streaming services do the job. We
>> could possibly fix this with an update to the documentation. For example,
>> the sample playlists at http://xspf.org/quickstart/ could show how to do
>> it.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Mar 24, 2020 at 10:05 AM Lucas Gonze <lucas at gonze.com> wrote:
>>
>>> Benoît, it's excellent to meet you. I am CC'ing the XSPF list at
>>> playlist at xiph.org and copying this answer to the Stack Overflow thread.
>>>
>>> The info element is designed to do what you need:
>>> http://xspf.org/xspf-v1.html#rfc.section.4.1.1.2.14.1.1.1.6
>>>
>>> However, there can only be one info element per track.
>>>
>>> Regarding the many years since the last update of the spec, maybe it's
>>> time to do one. A blessed JSON version would be useful.
>>>
>>> -Lucas
>>>
>>>
>>> On Tue, Mar 24, 2020 at 1:38 AM Benoît Gréant <gordie.lachance at gmail.com>
>>> wrote:
>>>
>>>> Hi guys !
>>>>
>>>> I love your XSPF thing :)
>>>> Have been playing with it since several years, using it as base for my
>>>> website (&API
>>>> <https://www.spiff-radio.org/wordpress-soundsystem-plugin/soundsystem-api/>,
>>>> &WP plugin) spiff-radio.org.
>>>>
>>>> I have a small question.  I want to attach (several) links to a
>>>> playlist track (eg. spotify/youtuble/apple music...); what tag should I use
>>>> for this ?
>>>>
>>>> Well, I posted the complete question on Stackoverflow
>>>> <https://stackoverflow.com/questions/60822682/xspf-xml-playlist-specifications-how-should-i-format-links-to-one-or-several>
>>>> .
>>>>
>>>> Thanks for your help.
>>>>
>>>> Benoît
>>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/playlist/attachments/20200914/cc9271a1/attachment.html>


More information about the Playlist mailing list