mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-16 10:09:28 +02:00
subsonic: only set tags if genre is non-empty
This commit is contained in:
parent
acb0e9cb11
commit
6eaef18188
1 changed files with 4 additions and 1 deletions
|
@ -105,11 +105,14 @@ func SongAsLove(song subsonic.Child, username string) models.Love {
|
|||
ArtistNames: []string{song.Artist},
|
||||
TrackNumber: song.Track,
|
||||
DiscNumber: song.DiscNumber,
|
||||
Tags: []string{song.Genre},
|
||||
AdditionalInfo: map[string]any{},
|
||||
Duration: time.Duration(song.Duration * int(time.Second)),
|
||||
},
|
||||
}
|
||||
|
||||
if song.Genre != "" {
|
||||
love.Track.Tags = []string{song.Genre}
|
||||
}
|
||||
|
||||
return love
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue