Fix #668: Add sample rate, bit depth, channels to track info dialog

This commit is contained in:
Drew Weymouth
2025-08-08 07:50:43 -07:00
parent dbea096edf
commit 766cfdfe91
7 changed files with 31 additions and 1 deletions
+9
View File
@@ -105,6 +105,15 @@ func (t *TrackInfoDialog) CreateRenderer() fyne.WidgetRenderer {
addFormRow(c, lang.L("Content type"), t.track.ContentType)
addFormRow(c, lang.L("Bit rate"), fmt.Sprintf("%d kbps", t.track.BitRate))
if t.track.SampleRate > 0 {
addFormRow(c, lang.L("Sample rate"), fmt.Sprintf("%d Hz", t.track.SampleRate))
}
if t.track.BitDepth > 0 {
addFormRow(c, lang.L("Bit depth"), strconv.Itoa(t.track.BitDepth))
}
if t.track.Channels > 0 {
addFormRow(c, lang.L("Channels"), strconv.Itoa(t.track.Channels))
}
addFormRow(c, lang.L("File size"), util.BytesToSizeString(t.track.Size))
addFormRow(c, lang.L("Play count"), strconv.Itoa(t.track.PlayCount))