incremental waveform generation (kind-of) working
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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", " ")
|
||||
|
||||
Reference in New Issue
Block a user