Closed celynw closed 10 months ago
Thanks for reporting this! Also, please do open a pull request for the useCount and contentCreated fields - as you mention we can easily fill those from the existing metadata. The rest, except for lyrics which isn't implemented yet in Supersonic, aren't exposed by the Subsonic API, though if the OpenSubsonic extensions ever move forward, there's the possibility some of those will be available later.
As for the getSong
Subsonic endpoint, it returns the metadata for an individual track. The official API specification is light on details as you can see, but each endpoint has an example response that is helpful when trying to understand what the API call actually returns.
Got it, thanks!
I am happy to have found this project, and I'm pleased with the recently-added MPRIS support. Thanks!
I noticed the MPRIS spec (spefically, Xesam) has some additional fields which aren't being used. A couple of them can be populated quite easily as this information is already available through subsonic and within supersonic.
https://github.com/dweymouth/supersonic/blob/9b2fee47f1bb566d433c613c9ab3d30fe3b27d75/backend/mediaprovider/model.go#L53-L73
Easy to add:
xesam:useCount
: "The number of times the track has been played." I believe this should map toTrack.PlayCount
xesam:contentCreated
: "When the track was created. Usually only the year component will be useful." According to the spec description, I think this should be used for theTrack.Year
field (this is my motivation for this issue)I have a fork which implements this (it's simple enough for a first-time go user!). I would be interested to know if this is something I can contribute to. But also, to 'finish the job', I'm interested in some of the other empty MPRIS fields:
xesam:url
: "The location of the media file." Could useTrack.FilePath
?xesam:albumArtist
: "The album artist(s)." Doesn't seem to be exposed by subsonicxesam:comment
: "A (list of) freeform comment(s)." Doesn't seem to be exposed by subsonicxesam:composer
: "The composer(s) of the track." Doesn't seem to be exposed by subsonicxesam:lastUsed
: "When the track was last played." Doesn't seem to be exposed by subsonic, but I assume most subsonic servers will at least track this, including navidromexesam:firstUsed
: "When the track was first played." Doesn't seem to be exposed by subsonicxesam:asText
: "The track lyrics." I guess this is possible thanks to subsonic'sgetLyrics
(related - #238)Side note: I can't find a reference of what subsonic's
getSong
is actually supposed to return! There's the subsonic api reference which doesn't link to what<song>
is, and the openSubsonic documentation but it's not written yet