public DataAsyncResult UpdatePlaylist(Playlist entity, TaskParam taskParam) { return this.EnqueueRequest(taskParam, () => { base.PlaylistDataService.Update(entity); return null; }); }
public void RemoveAudioMediaFromPlaylist(AudioMedia audioMedia, Playlist playlist) { base.PlaylistAudioMediaDataService.Delete(new PlaylistAudioMedia() { PlaylistId = playlist.Id, AudioMediaId = audioMedia.Id }); playlist.Songs.Remove(audioMedia); }
public void AddAudioMediaToPlaylist(AudioMedia audioMedia, Playlist playlist) { base.PlaylistAudioMediaDataService.Insert(new PlaylistAudioMedia() { PlaylistId = playlist.Id, AudioMediaId = audioMedia.Id }); playlist.Songs.Add(audioMedia); }
public DataAsyncResult AddPlaylist(string title, TaskParam taskParam) { return this.EnqueueRequest(taskParam, () => { var entity = new Playlist() { Title = title, Visible = true }; base.PlaylistDataService.Insert(entity); this.Playlists.Add(entity); return null; }); }
public void Play(Playlist playlist) { this.PlayInternal(playlist.SongsVisible); }