Skip to content

Commit

Permalink
Musixmatch provider no longer supports retry
Browse files Browse the repository at this point in the history
  • Loading branch information
Lambada10 committed Oct 24, 2024
1 parent 76f661b commit 6116e6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,7 @@ class MusixmatchAPI {
if (response.status.value !in 200..299)
return null

val json = json.decodeFromString<MusixmatchSearchResponse>(responseBody)

val result = try {
json[offset]
} catch (e: IndexOutOfBoundsException) {
return null
}
val result = json.decodeFromString<MusixmatchSearchResponse>(responseBody)

return SongInfo(
songName = result.songName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ fun SharedTransitionScope.LyricsFetchScreen(
lyricsFetchState = viewModel.lyricsFetchState,
animatedVisibilityScope = animatedVisibilityScope,
disableMarquee = viewModel.userSettingsController.disableMarquee,
allowTryingAgain = viewModel.userSettingsController.selectedProvider != Providers.APPLE
allowTryingAgain =
viewModel.userSettingsController.selectedProvider != Providers.APPLE &&
viewModel.userSettingsController.selectedProvider != Providers.MUSIXMATCH
)

is QueryStatus.Failed -> FailedDialogue(
Expand Down

0 comments on commit 6116e6c

Please sign in to comment.