Skip to content

Commit

Permalink
Tell user to try changing token strategy + Rate limit dialog in Brows…
Browse files Browse the repository at this point in the history
…e tab
  • Loading branch information
Lambada10 committed Aug 4, 2023
1 parent 2812f65 commit 27fdd34
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,14 @@ fun BrowseScreen(viewModel: MainViewModel) {
)
}

is FileNotFoundException -> { // Rate limit
Column {
Text(text = stringResource(R.string.spotify_api_rate_limit_reached))
Text(text = stringResource(R.string.please_try_again_later))
Text(text = stringResource(R.string.change_api_strategy))
}
}

else -> {
Text(text = failReason.toString())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,7 @@ fun BatchDownloadLyrics(songs: List<Song>, viewModel: MainViewModel, onDone: ()
Column {
Text(text = stringResource(R.string.spotify_api_rate_limit_reached))
Text(text = stringResource(R.string.please_try_again_later))
Text(text = stringResource(R.string.change_api_strategy))
}
},
onDismissRequest = {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,5 @@
<string name="default_keys">Default API credentials</string>
<string name="web_player_keys">Web Player API</string>
<string name="custom_keys">Custom API credentials</string>
<string name="change_api_strategy">You can also try alternative ways to connect to Spotify network in settings.</string>
</resources>

0 comments on commit 27fdd34

Please sign in to comment.