Skip to content

Commit

Permalink
Do not reset authentication if last.fm returns auth failure (#27)
Browse files Browse the repository at this point in the history
It is currently unclear whether last.fm's error code 4 (no permissions) is
only an intermittent error or not.
  • Loading branch information
gix committed Mar 28, 2021
1 parent 8ae9617 commit 69220be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.5.0] - 2021-03-28
### Changed
- A permission denied error from last.fm only temporarily suspends scrobbling
instead of resetting authorization. This may help with intermittent errors
on last.fm's side. (#27)

## [1.4.0] - 2020-11-22
### Fixed
- If authorization with last.fm is rejected, the unauthorized state is now
Expand Down
3 changes: 3 additions & 0 deletions src/foo_scrobble/LastfmScrobbleService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ void LastfmScrobbleService::HandleResponseStatus(lastfm::Status status)
break;

case lastfm::Status::AuthenticationFailed:
PauseProcessing(minutes(1));
break;

case lastfm::Status::InvalidSessionKey:
state_ = State::UnauthenticatedIdle;
ClearSessionKeyLocked();
Expand Down

0 comments on commit 69220be

Please sign in to comment.