refactor tracklist to use MediaItem, even if it only contains tracks
This commit is contained in:
@@ -175,8 +175,8 @@ func NewExpandedTracklistRow(tracklist *Tracklist, im *backend.ImageManager, pla
|
||||
}
|
||||
|
||||
func (t *ExpandedTracklistRow) Update(tm *util.TrackListModel, rowNum int) {
|
||||
if t.trackID != tm.Track.ID {
|
||||
t.imageLoader.Load(tm.Track.CoverArtID)
|
||||
if t.trackID != tm.Track().ID {
|
||||
t.imageLoader.Load(tm.Track().CoverArtID)
|
||||
}
|
||||
t.tracklistRowBase.Update(tm, rowNum)
|
||||
}
|
||||
@@ -256,10 +256,10 @@ func (t *tracklistRowBase) Update(tm *util.TrackListModel, rowNum int) {
|
||||
|
||||
// Update info that can change if this row is bound to
|
||||
// a new track (*mediaprovider.Track)
|
||||
tr := tm.Track
|
||||
if tr.ID != t.trackID {
|
||||
tr := tm.Track()
|
||||
if id := tr.ID; id != t.trackID {
|
||||
t.EnsureUnfocused()
|
||||
t.trackID = tr.ID
|
||||
t.trackID = id
|
||||
|
||||
t.name.Segments[0].(*widget.TextSegment).Text = tr.Title
|
||||
t.artist.BuildSegments(tr.ArtistNames, tr.ArtistIDs)
|
||||
|
||||
Reference in New Issue
Block a user