incremental waveform generation (kind-of) working

This commit is contained in:
Drew Weymouth
2025-07-26 15:33:22 -07:00
parent 88b7f62e50
commit c521c617ec
17 changed files with 365 additions and 160 deletions
+1 -1
View File
@@ -453,7 +453,7 @@ func (p *PlayQueueListRow) Update(tm *util.TrackListModel, rowNum int) {
p.title.Text = meta.Name
p.title.SetToolTip(meta.Name)
p.artist.BuildSegments(meta.Artists, meta.ArtistIDs)
p.time.Text = util.SecondsToMMSS(float64(meta.Duration))
p.time.Text = util.SecondsToMMSS(meta.Duration.Seconds())
}
// Render whether track is playing or not
+1 -1
View File
@@ -439,7 +439,7 @@ func (t *Tracklist) doSortTracks() {
case ColumnRating:
t.intSort(func(tr *util.TrackListModel) int64 { return int64(tr.Track().Rating) })
case ColumnTime:
t.intSort(func(tr *util.TrackListModel) int64 { return int64(tr.Track().Duration) })
t.intSort(func(tr *util.TrackListModel) int64 { return tr.Track().Duration.Milliseconds() })
case ColumnYear:
t.intSort(func(tr *util.TrackListModel) int64 { return int64(tr.Track().Year) })
case ColumnSize:
+1 -1
View File
@@ -401,7 +401,7 @@ func (t *tracklistRowBase) doUpdate(tm *util.TrackListModel, rowNum int) {
t.artist.BuildSegments(tr.ArtistNames, tr.ArtistIDs)
t.album.BuildSegments([]string{tr.Album}, []string{tr.AlbumID})
t.composer.BuildSegments(tr.ComposerNames, tr.ComposerIDs)
t.dur.Text = util.SecondsToMMSS(float64(tr.Duration))
t.dur.Text = util.SecondsToMMSS(tr.Duration.Seconds())
t.year.Text = strconv.Itoa(tr.Year)
t.plays.Text = strconv.Itoa(int(tr.PlayCount))
t.comment.Text = strings.ReplaceAll(tr.Comment, "\n", " ")