public void Execute(object parameter)
        {
            var itemToRemove = (ListItemViewModel)parameter;

            if (_listRepository.DeleteItem(itemToRemove.Id))
            {
                this._viewModel.PlaylistCollection.Remove(itemToRemove);
            }
        }
Exemple #2
0
        public bool RemovePlaylistItem(IVideoContent item)
        {
            var result = _playlistRepository.DeleteItem(Id, item.Id);

            if (result)
            {
                ItemRemoved?.Invoke(this, new LocalPlaylistItemRemovedEventArgs()
                {
                    PlaylistId   = Id,
                    RemovedItems = new[] { item.Id }
                });
            }
            return(result);
        }