public async Task UploadFiles()
        {
            var serverUploadFolder = ConfigurationManager.AppSettings["MediaServerSaveBaseUrl"];
            var streamProvider = new MultipartFormDataStreamProvider(serverUploadFolder);
            await Request.Content.ReadAsMultipartAsync(streamProvider);

            MusicService service = new MusicService();
            for (int i = 0; i < streamProvider.Contents.Count; i++)
            {
                string fileOriginalName = streamProvider.Contents[i].Headers.ContentDisposition.FileName.Trim(new char[] { '\"' });
                string fileGuid = Path.GetFileName(streamProvider.FileData[i].LocalFileName);

                service.Store(fileOriginalName, fileGuid);
            }

        }
 public async Task RateSong(SongRatingDto rating)
 {
     MusicService service = new MusicService();
     var username = this.User.Identity.Name;
     service.RateSong(rating, username);
 }
 public async Task<PlayerSongDto> GetNextSong(NextSongDto nextSongRequest)
 {
     MusicService service = new MusicService();
     var song = service.GetNextSong(nextSongRequest, User.Identity.Name);
     return song;
 }
 public async Task<List<SongDto>> SearchSong(string s)
 {
     MusicService service = new MusicService();
     var songs = service.SearchSong(s);
     return songs;
 }
 public async Task<PlayerSongDto> GetSong(int songId)
 {
     MusicService service = new MusicService();
     var song = service.GetSong(songId, User.Identity.Name);
     return song;
 }
 public async Task<List<SongDto>> GetAll()
 {
     MusicService service = new MusicService();
     var allSongs = service.GetAllSongs();
     return allSongs;
 }