/// <summary> /// Introduce a playlist to the environment. This sets the Known value of the playlist /// to true and binds the necessary events. /// TODO: move content-related change binds to somewhere else, so they are only called /// when we already have a touchee representation of the playlist /// </summary> void Introduce(SpotiFire.Playlist playlist) { playlist.SetKnown(true); playlist.ImageChanged += playlist_ImageChanged; playlist.MetadataUpdated += playlist_MetadataUpdated; playlist.Renamed += playlist_Renamed; playlist.UpdateInProgress += playlist_UpdateInProgress; }
/// <summary> /// Forget a playlist. This sets the Known value of the Playlist to false and unbinds /// all the events. /// </summary> void Forget(SpotiFire.Playlist playlist) { playlist.SetKnown(false); playlist.ImageChanged -= playlist_ImageChanged; playlist.MetadataUpdated -= playlist_MetadataUpdated; playlist.Renamed -= playlist_Renamed; playlist.UpdateInProgress -= playlist_UpdateInProgress; playlist.StateChanged -= playlist_StateChanged; playlist.Tracks.CollectionChanged -= tracks_CollectionChanged; }