diff --git a/lib/services/queries/lyrics.dart b/lib/services/queries/lyrics.dart index faa5bdec..060f64b7 100644 --- a/lib/services/queries/lyrics.dart +++ b/lib/services/queries/lyrics.dart @@ -48,7 +48,9 @@ class LyricsQueries { throw "No track currently"; } final timedLyrics = await ServiceUtils.getTimedLyrics(track); - if (timedLyrics == null) throw Exception("Unable to find lyrics"); + if (timedLyrics == null) { + return SubtitleSimple(errorMessage: "Unable to find lyrics"); + } return timedLyrics; }, @@ -83,8 +85,8 @@ class LyricsQueries { }); if (res.statusCode != 200) { - throw Exception("Unable to find lyrics"); - } + return SubtitleSimple(errorMessage: "Unable to find lyrics"); + } final linesRaw = Map.castFrom( jsonDecode(res.body), )["lyrics"]?["lines"] as List?;