feat(subsonic): add stub lyrics.view

fixes #274
This commit is contained in:
sentriz
2022-12-26 01:50:42 +00:00
parent 2bf8595d96
commit 0407a1581f
3 changed files with 14 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ type Response struct {
SimilarSongs *SimilarSongs `xml:"similarSongs" json:"similarSongs,omitempty"`
SimilarSongsTwo *SimilarSongsTwo `xml:"similarSongs2" json:"similarSongs2,omitempty"`
InternetRadioStations *InternetRadioStations `xml:"internetRadioStations" json:"internetRadioStations,omitempty"`
Lyrics *Lyrics `xml:"lyrics" json:"lyrics,omitempty"`
}
func NewResponse() *Response {
@@ -409,6 +410,12 @@ type InternetRadioStation struct {
HomepageURL string `xml:"homepageUrl,attr" json:"homepageUrl"`
}
type Lyrics struct {
Value string `xml:",chardata" json:"value,omitempty"`
Artist string `xml:"artist,attr,omitempty" json:"artist,omitempty"`
Title string `xml:"title,attr,omitempty" json:"title,omitempty"`
}
func formatRating(rating float64) string {
if rating == 0 {
return ""