示例#1
0
        public async Task <int> GetCurrentPlaybackPlaylistIndex(List <Track> playbackPlaylist)
        {
            var currentTrack = await _spotifyService.GetCurrentTrack();

            // Figure out the position the current track has in the current playlist
            return(playbackPlaylist.FindIndex(t => t.Id == currentTrack.Id));
        }