add more info to dialog and adjust layout

This commit is contained in:
Drew Weymouth
2024-07-18 08:11:37 -07:00
parent bb91a0c6b4
commit 03ce1cc115
5 changed files with 73 additions and 21 deletions
+10
View File
@@ -102,7 +102,17 @@ type Track struct {
PlayCount int
FilePath string
BitRate int
ContentType string
Comment string
BPM int
ReplayGain ReplayGainInfo
}
type ReplayGainInfo struct {
TrackGain float64
AlbumGain float64
TrackPeak float64
AlbumPeak float64
}
type Playlist struct {
@@ -493,6 +493,13 @@ func toTrack(ch *subsonic.Child) *mediaprovider.Track {
artistIDs = append(artistIDs, ch.ArtistID)
}
var rGain mediaprovider.ReplayGainInfo
if rg := ch.ReplayGain; rg != nil {
rGain.AlbumGain = rg.AlbumGain
rGain.TrackGain = rg.TrackGain
rGain.AlbumPeak = rg.AlbumPeak
rGain.TrackPeak = rg.TrackPeak
}
return &mediaprovider.Track{
ID: ch.ID,
CoverArtID: ch.CoverArt,
@@ -513,7 +520,9 @@ func toTrack(ch *subsonic.Child) *mediaprovider.Track {
FilePath: ch.Path,
Size: ch.Size,
BitRate: ch.BitRate,
ContentType: ch.ContentType,
Comment: ch.Comment,
BPM: ch.BPM,
}
}