GNOME Bugzilla – Bug 349018
When track are added to the active source, playlistView is not refreshed
Last modified: 2008-02-16 04:02:56 UTC
For example, when the active source is a DAP, and tracks are beeing imported, the are not displayed in the PlaylistView. The user has to click on another source and then click back on the DAP source to see al th tracks. I think there a re different problems, but I have not been able to fix it completely: * in PlayerInterface, RaiseUpdate is not used when adding tack playlistModel.AddTrack(args.Track, true); instead of playlistModel.AddTrack(args.Track; * PlaylistView: does not listen to model.Updated. A brief summary of the hanged I made: this.DrawEnd += new EventHandler(OnDrawEnd); [...] void OnModelUpdated(object sender, EventArgs e) { if (this.drawing == false) { this.drawing = true; this.ThreadedQueueDraw(); } } * DapDevice does not call source.OnUpdate when adding track: public virtual void AddTrack(TrackInfo track) { ... source.OnTrackAdded(track); } With these changes, the PlaylistView get filled in real time, but only until the scrollbar appears. Then, it stops updating the list of tracks.
This problem is also effecting a plugin that I wrote to clean stale tracks from the library. If I progmatically remove tracks from the Library class the active playlist isn't updated. The database and all other playlists update correctly. To see the results of my cleanup plugin you have to switch to a different playlist or to the podcast plugin, etc.
I think there's a .Update() call you can make on the PlaylistSource type to force the view to Update, but don't quote me on it. It was either a .Update() or an UpdateUI() call that I seem to recall seeing somewhere.
I believe that this was fixed, because importing a playlist seems to work correctly without requiring the user to switch active sources.
OK, closing then. Reopen if you think this is a mistake.