Esempio n. 1
0
 public DataAsyncResult UpdatePlaylist(Playlist entity, TaskParam taskParam)
 {
     return this.EnqueueRequest(taskParam, () =>
     {
         base.PlaylistDataService.Update(entity);
         return null;
     });
 }
Esempio n. 2
0
 public void RemoveAudioMediaFromPlaylist(AudioMedia audioMedia, Playlist playlist)
 {
     base.PlaylistAudioMediaDataService.Delete(new PlaylistAudioMedia() { PlaylistId = playlist.Id, AudioMediaId = audioMedia.Id });
     playlist.Songs.Remove(audioMedia);
 }
Esempio n. 3
0
 public void AddAudioMediaToPlaylist(AudioMedia audioMedia, Playlist playlist)
 {
     base.PlaylistAudioMediaDataService.Insert(new PlaylistAudioMedia() { PlaylistId = playlist.Id, AudioMediaId = audioMedia.Id });
     playlist.Songs.Add(audioMedia);
 }
Esempio n. 4
0
 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);
 }