remove newlines from track comments in list display

This commit is contained in:
Drew Weymouth
2025-04-17 08:18:53 -07:00
parent 42013ba598
commit a3c9844487
+2 -1
View File
@@ -4,6 +4,7 @@ import (
"fmt" "fmt"
"image" "image"
"strconv" "strconv"
"strings"
"sync" "sync"
"time" "time"
@@ -393,7 +394,7 @@ func (t *tracklistRowBase) doUpdate(tm *util.TrackListModel, rowNum int) {
t.dur.Text = util.SecondsToMMSS(float64(tr.Duration)) t.dur.Text = util.SecondsToMMSS(float64(tr.Duration))
t.year.Text = strconv.Itoa(tr.Year) t.year.Text = strconv.Itoa(tr.Year)
t.plays.Text = strconv.Itoa(int(tr.PlayCount)) t.plays.Text = strconv.Itoa(int(tr.PlayCount))
t.comment.Text = tr.Comment t.comment.Text = strings.ReplaceAll(tr.Comment, "\n", " ")
t.comment.SetToolTip(tr.Comment) t.comment.SetToolTip(tr.Comment)
t.bitrate.Text = strconv.Itoa(tr.BitRate) t.bitrate.Text = strconv.Itoa(tr.BitRate)
t.size.Text = util.BytesToSizeString(tr.Size) t.size.Text = util.BytesToSizeString(tr.Size)