public override async Task <bool> AddToLibrary(OnlineSong song) { if (!RequiresAuthentication) { return(await MusicProvider.ProcessTracks(new List <FullTrackData> { new FullTrackData(song.Name, song.TrackData.Artist, song.TrackData.AlbumArtist, song.TrackData.Album, song.TrackData.Genre) { AlbumArtwork = new List <AlbumArtwork> { new AlbumArtwork { Url = string.Format("http://img.youtube.com/vi/{0}/0.jpg", song.TrackData.Id) } }, MediaType = MediaType.Video, ServiceId = Api.Identifier, Id = song.TrackData.Id, ServiceType = ServiceType.YouTube, FileExtension = "mp3", Disc = song.TrackData.Disc, Track = song.TrackData.Track, Year = song.TrackData.Year, } })); } var notes = new Notes { Album = song.TrackData.Album, AlbumArtist = song.TrackData.AlbumArtist, Artist = song.TrackData.Artist, Disc = song.TrackData.Disc, Title = song.Name, Genre = song.TrackData.Genre, Track = song.TrackData.Track, Year = song.TrackData.Year, }; var plistId = await GetOrCreatePlaylistId(); var playlist = new Playlist() { Id = plistId }; return(await AddToPlaylist(song.TrackData, playlist, notes.ToJson())); }
public override async Task <bool> AddToLibrary(OnlineSong song) { var notes = new Notes { Album = song.TrackData.Album, AlbumArtist = song.TrackData.AlbumArtist, Artist = song.TrackData.Artist, Disc = song.TrackData.Disc, Title = song.Name, Genre = song.TrackData.Genre, Track = song.TrackData.Track, Year = song.TrackData.Year, }; var plistId = await GetOrCreatePlaylistId(); var playlist = new Playlist() { Id = plistId }; return(await AddToPlaylist(song.TrackData, playlist, notes.ToJson())); }
public override Task <bool> AddToLibrary(OnlineSong song) { return(SetRating(song.TrackData, 5)); }
public async Task <bool> AddToLibrary(OnlineSong song) { var api = ApiManager.Shared.GetMusicProvider(song.TrackData.ServiceId); return(await api.AddToLibrary(song)); }
public Task <bool> AddTemp(OnlineSong onlineSong) { return(MusicProvider.AddTemp(onlineSong)); }
public override Task <bool> AddToLibrary(OnlineSong song) { throw new NotImplementedException(); }