Example #1
0
        public PlaylistViewModel LookupPlaylist(PlaylistModel playlist)
        {
            if (PlaylistLookupMap.ContainsKey(playlist.PlaylistId))
            {
                return(PlaylistLookupMap[playlist.PlaylistId]);
            }
            else
            {
                PlaylistViewModel newViewModel = new PlaylistViewModel(playlist);

                PlaylistLookupMap.Add(newViewModel.PlaylistId, newViewModel);
                PlaylistCollection.Add(newViewModel);
                return(newViewModel);
            }
        }
Example #2
0
        internal void DeletePlaylist(PlaylistViewModel playlist)
        {
            playlist.IsBeingDeleted = true;

            LibraryModel.Current.DeletePlaylist(playlist.PlaylistId);
        }