After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 349018 - When track are added to the active source, playlistView is not refreshed
When track are added to the active source, playlistView is not refreshed
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: User Interface
git master
Other Linux
: Normal normal
: 2.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-07-28 01:04 UTC by julien sobrier
Modified: 2008-02-16 04:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description julien sobrier 2006-07-28 01:04:48 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.
Comment 1 Trey Ethridge 2006-10-06 16:40:27 UTC
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.
Comment 2 severedcross+bugzilla 2007-04-29 01:35:33 UTC
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.
Comment 3 Trey Ethridge 2007-04-30 20:58:18 UTC
I believe that this was fixed, because importing a playlist seems to work correctly without requiring the user to switch active sources.
Comment 4 Andrew Conkling 2008-02-16 04:02:56 UTC
OK, closing then. Reopen if you think this is a mistake.