mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
fix: better error message for failing to find lyrics #1085
This commit is contained in:
parent
79839329b0
commit
e58e18de33
@ -73,7 +73,7 @@ class PlainLyrics extends HookConsumerWidget {
|
|||||||
return const ShimmerLyrics();
|
return const ShimmerLyrics();
|
||||||
} else if (lyricsQuery.hasError) {
|
} else if (lyricsQuery.hasError) {
|
||||||
return Text(
|
return Text(
|
||||||
"Sorry, no Lyrics were found for `${playlist.activeTrack?.name}` :'(\n${lyricsQuery.error.toString()}",
|
"Sorry, no Lyrics were found for `${playlist.activeTrack?.name}` :'(\n${lyricsQuery.error.toString().replaceAll("Exception: ", "")}",
|
||||||
style: textTheme.bodyLarge?.copyWith(
|
style: textTheme.bodyLarge?.copyWith(
|
||||||
color: palette.bodyTextColor,
|
color: palette.bodyTextColor,
|
||||||
),
|
),
|
||||||
|
@ -190,7 +190,7 @@ class SyncedLyrics extends HookConsumerWidget {
|
|||||||
else if (playlist.activeTrack != null &&
|
else if (playlist.activeTrack != null &&
|
||||||
(timedLyricsQuery.hasError))
|
(timedLyricsQuery.hasError))
|
||||||
Text(
|
Text(
|
||||||
"Sorry, no Lyrics were found for `${playlist.activeTrack?.name}` :'(\n${timedLyricsQuery.error.toString()}",
|
"Sorry, no Lyrics were found for `${playlist.activeTrack?.name}` :'(\n${timedLyricsQuery.error.toString().replaceAll("Exception: ", "")}",
|
||||||
style: bodyTextTheme,
|
style: bodyTextTheme,
|
||||||
)
|
)
|
||||||
else if (isUnSyncLyric == true)
|
else if (isUnSyncLyric == true)
|
||||||
|
@ -63,8 +63,8 @@ class LyricsQueries {
|
|||||||
/// Special thanks to [raptag](https://github.com/raptag) for discovering this
|
/// Special thanks to [raptag](https://github.com/raptag) for discovering this
|
||||||
/// jem
|
/// jem
|
||||||
|
|
||||||
Query<SubtitleSimple, dynamic> spotifySynced(WidgetRef ref, Track? track) {
|
Query<SubtitleSimple, Exception> spotifySynced(WidgetRef ref, Track? track) {
|
||||||
return useSpotifyQuery<SubtitleSimple, dynamic>(
|
return useSpotifyQuery<SubtitleSimple, Exception>(
|
||||||
"spotify-synced-lyrics/${track?.id}}",
|
"spotify-synced-lyrics/${track?.id}}",
|
||||||
(spotify) async {
|
(spotify) async {
|
||||||
if (track == null) {
|
if (track == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user