Exemple #1
0
        private async Task RemoveTrackFromPlaylist()
        {
            // TODO: make sure the testuser has an access token.
            var spotifyClient = await _spotifyClientFactory.Create(_testOptions.TestUserId);

            // Remove the track from the Spotify playlist.
            await _spotifyClientService.RemoveTrackFromPlaylist(spotifyClient, _testOptions.TestTrackId, _testOptions.TestPlaylistId);
        }
Exemple #2
0
        private async Task RemoveTrack(ISpotifyClient spotifyClient, Track track)
        {
            // Mark the track as removed and save it.
            track.State = TrackState.RemovedByDownvotes;

            await _trackRepository.Upsert(track);

            // Remove the track from the spotify playlist.
            await _spotifyClientService.RemoveTrackFromPlaylist(spotifyClient, track.Id, track.PlaylistId);
        }