예제 #1
0
 private void AddToPlaylist (PlaylistSource playlist)
 {
     if (!FilterFocused) {
         playlist.AddSelectedTracks (ActiveSource);
     } else {
         playlist.AddAllTracks (ActiveSource);
     }
 }
예제 #2
0
 private void AddToPlaylist(PlaylistSource playlist)
 {
     if (!FilterFocused) {
         var track = ServiceManager.PlayerEngine.CurrentTrack as DatabaseTrackInfo;
         if (chosen_from_playing_track_submenu && track != null) {
             playlist.AddTrack (track);
         } else {
             playlist.AddSelectedTracks (ActiveSource);
         }
     } else {
         playlist.AddAllTracks (ActiveSource);
     }
 }
 private void OnAddToNewPlaylist (object o, EventArgs args)
 {
     // TODO generate name based on the track selection, or begin editing it
     PlaylistSource playlist = new PlaylistSource (Catalog.GetString ("New Playlist"), ActivePrimarySource);
     playlist.Save ();
     playlist.PrimarySource.AddChildSource (playlist);
     ThreadAssist.SpawnFromMain (delegate {
         playlist.AddSelectedTracks (ActiveSource);
     });
 }