mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-27 06:37:56 +02:00
Move the JSPF playlist code into public module
This commit is contained in:
parent
0f5cb49b4c
commit
e1c9fb6076
11 changed files with 367 additions and 56 deletions
91
pkg/jspf/testdata/comprehensive.jspf
vendored
Normal file
91
pkg/jspf/testdata/comprehensive.jspf
vendored
Normal file
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
"playlist": {
|
||||
"title": "JSPF example",
|
||||
"creator": "Name of playlist author",
|
||||
"annotation": "Super playlist",
|
||||
"info": "http://example.com/",
|
||||
"location": "http://example.com/",
|
||||
"identifier": "http://example.com/",
|
||||
"image": "http://example.com/",
|
||||
"date": "2005-01-08T17:10:47-05:00",
|
||||
"license": "http://example.com/",
|
||||
"attribution": [
|
||||
{
|
||||
"identifier": "http://example.com/"
|
||||
},
|
||||
{
|
||||
"location": "http://example.com/"
|
||||
}
|
||||
],
|
||||
"link": [
|
||||
{
|
||||
"http://example.com/rel/1/": "http://example.com/body/1/"
|
||||
},
|
||||
{
|
||||
"http://example.com/rel/2/": "http://example.com/body/2/"
|
||||
}
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"http://example.com/rel/1/": "my meta 14"
|
||||
},
|
||||
{
|
||||
"http://example.com/rel/2/": "345"
|
||||
}
|
||||
],
|
||||
"extension": {
|
||||
"http://example.com/app/1/": [
|
||||
"ARBITRARY_EXTENSION_BODY",
|
||||
{}
|
||||
],
|
||||
"http://example.com/app/2/": [
|
||||
"ARBITRARY_EXTENSION_BODY"
|
||||
]
|
||||
},
|
||||
"track": [
|
||||
{
|
||||
"location": [
|
||||
"http://example.com/1.ogg",
|
||||
"http://example.com/2.mp3"
|
||||
],
|
||||
"identifier": [
|
||||
"http://example.com/1/",
|
||||
"http://example.com/2/"
|
||||
],
|
||||
"title": "Track title",
|
||||
"creator": "Artist name",
|
||||
"annotation": "Some text",
|
||||
"info": "http://example.com/",
|
||||
"image": "http://example.com/",
|
||||
"album": "Album name",
|
||||
"trackNum": 1,
|
||||
"duration": 0,
|
||||
"link": [
|
||||
{
|
||||
"http://example.com/rel/1/": "http://example.com/body/1/"
|
||||
},
|
||||
{
|
||||
"http://example.com/rel/2/": "http://example.com/body/2/"
|
||||
}
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"http://example.com/rel/1/": "my meta 14"
|
||||
},
|
||||
{
|
||||
"http://example.com/rel/2/": "345"
|
||||
}
|
||||
],
|
||||
"extension": {
|
||||
"http://example.com/app/1/": [
|
||||
"ARBITRARY_EXTENSION_BODY",
|
||||
{}
|
||||
],
|
||||
"http://example.com/app/2/": [
|
||||
"ARBITRARY_EXTENSION_BODY"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
58
pkg/jspf/testdata/lb-playlist.jspf
vendored
Normal file
58
pkg/jspf/testdata/lb-playlist.jspf
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"playlist": {
|
||||
"creator": "outsidecontext",
|
||||
"date": "2023-07-04T21:03:52.317148+00:00",
|
||||
"extension": {
|
||||
"https://musicbrainz.org/doc/jspf#playlist": {
|
||||
"creator": "outsidecontext",
|
||||
"last_modified_at": "2023-07-10T10:03:48.833282+00:00",
|
||||
"public": false
|
||||
}
|
||||
},
|
||||
"identifier": "https://listenbrainz.org/playlist/96485e27-967a-492a-9d04-c5a819baa2f3",
|
||||
"title": "Fundst\u00fccke",
|
||||
"track": [
|
||||
{
|
||||
"creator": "Airghoul feat. Priest",
|
||||
"extension": {
|
||||
"https://musicbrainz.org/doc/jspf#track": {
|
||||
"added_at": "2023-07-04T21:05:59.492439+00:00",
|
||||
"added_by": "outsidecontext",
|
||||
"additional_metadata": {
|
||||
"caa_id": 32981136309,
|
||||
"caa_release_mbid": "fb7d69d6-0b4b-4f99-a77a-c3a0d786b52c"
|
||||
},
|
||||
"artist_identifiers": [
|
||||
"https://musicbrainz.org/artist/554a5819-6c3f-4734-ae4c-11eabb7ca2e0",
|
||||
"https://musicbrainz.org/artist/56ff293f-ec9a-4741-9d14-0537c4fb8f97"
|
||||
]
|
||||
}
|
||||
},
|
||||
"identifier": [
|
||||
"https://musicbrainz.org/recording/3f2bdbbd-063e-478c-a394-6da0cb303302"
|
||||
],
|
||||
"title": "Orange Forest"
|
||||
},
|
||||
{
|
||||
"creator": "Crippled Black Phoenix",
|
||||
"extension": {
|
||||
"https://musicbrainz.org/doc/jspf#track": {
|
||||
"added_at": "2023-07-10T10:03:48.833330+00:00",
|
||||
"added_by": "outsidecontext",
|
||||
"additional_metadata": {
|
||||
"caa_id": 28699084533,
|
||||
"caa_release_mbid": "92e7cf6c-e626-4409-81b0-0fcb8a0c3699"
|
||||
},
|
||||
"artist_identifiers": [
|
||||
"https://musicbrainz.org/artist/055b6082-b9cc-4688-85c4-8153c0ef2d70"
|
||||
]
|
||||
}
|
||||
},
|
||||
"identifier": [
|
||||
"https://musicbrainz.org/recording/14d612f0-4022-4adc-8cef-87a569e2d65c"
|
||||
],
|
||||
"title": "Lost"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
24
pkg/jspf/testdata/simple.jspf
vendored
Normal file
24
pkg/jspf/testdata/simple.jspf
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"playlist": {
|
||||
"title": "Two Songs From Thriller",
|
||||
"creator": "MJ Fan",
|
||||
"track": [
|
||||
{
|
||||
"location": [
|
||||
"http://example.com/billiejean.mp3"
|
||||
],
|
||||
"title": "Billie Jean",
|
||||
"creator": "Michael Jackson",
|
||||
"album": "Thriller"
|
||||
},
|
||||
{
|
||||
"location": [
|
||||
"http://example.com/thegirlismine.mp3"
|
||||
],
|
||||
"title": "The Girl Is Mine",
|
||||
"creator": "Michael Jackson",
|
||||
"album": "Thriller"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue