Exemplo n.º 1
0
 public bool AddSongToPlaylist(Song song, Playlist playlist)
 {
     //var result = false;
     //if (ContainsPlaylist(playlist))
     //{
     //    _playlists.Find(pl => pl.Id == playlist.Id).Add(song);
     //    if (playlist.Id != -1) PlaylistsChanged = true;
     //    result = true;
     //}
     //return result;
     throw  new NotImplementedException();
 }
Exemplo n.º 2
0
        //public Playlist PlayedSongs { get; private set; }
        public PlaylistService(IRequestService requestService)
        {
            _publisher = Publisher.Instance;
            _publisher.SubscribeToMessages(this, "SignIn", "SighOut");

            _requestService = requestService;
            PlaylistsChanged = false;

            //PlayedSongs = new Playlist(-1, PlayedSongsName, new List<Song>());
            CurrentPlaylist = new Playlist(-1, CurrentPlaylistName, new List<Song>());

            //_playlists = new List<Playlist> { PlayedSongs };
            _playlists = new List<Playlist>();
            Playlists = new ListCollectionView(_playlists);
            //Playlists.CurrentChanged += PlaylistSelected;
        }
Exemplo n.º 3
0
 public bool RenamePlaylist(Playlist playlist, string newName)
 {
     //var response = _requestService.GetResponse(APIPlaylist,
     //    string.Format("cmd=rename&name={0}&pid={1}", newName, playlist.Id));
     //var contract = DeserializeJson<object>(response);
     //return contract.Success;
     throw  new NotImplementedException();
 }
Exemplo n.º 4
0
 public bool RemoveSongFromPlaylist(Song song, Playlist playlist)
 {
     var removeResult = playlist.Remove(song);
     if (playlist.Id != -1) PlaylistsChanged = removeResult;
     return removeResult;
 }