public async Task UpdateNowPlaying(Track track, CancellationToken cancellationToken) { try { await scrobbler.UpdateNowPlaying(track, cancellationToken); } #pragma warning disable CA1031 // Do not catch general exception types catch (Exception e) #pragma warning restore CA1031 // Do not catch general exception types { logger.LogWarning($"Failed to update Now Playing Track for '{track}'. Error: {e.Message}"); } }
public Task RegisterPlaybackStart(SongModel song, CancellationToken cancellationToken) { return(scrobbler.UpdateNowPlaying(GetTrackFromSong(song), cancellationToken)); }