File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Sources/LyricsService/Provider/Services Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -112,8 +112,11 @@ extension LyricsProviders.Musixmatch: _LyricsProvider {
112112
113113 public func fetch( with token: LyricsToken ) async throws -> Lyrics {
114114 // Check if synced lyrics are available
115- if token. value. hasSubtitles == 0 || token. value. instrumental == 1 {
116- return Lyrics ( lines: [ ] , idTags: [ : ] )
115+ if token. value. hasSubtitles == 0 {
116+ throw LyricsProviderError . processingFailed ( reason: " Lyrics not found " )
117+ }
118+ if token. value. instrumental == 1 {
119+ throw LyricsProviderError . processingFailed ( reason: " Instrumental track " )
117120 }
118121
119122 // Build URL with query items
@@ -167,7 +170,7 @@ extension LyricsProviders.Musixmatch: _LyricsProvider {
167170 . subtitleBody,
168171 let track = body. matcherTrackGet? . message. body. track
169172 else {
170- return Lyrics ( lines : [ ] , idTags : [ : ] )
173+ throw LyricsProviderError . processingFailed ( reason : " Lyrics not found " )
171174 }
172175
173176 let lyrics = try parseLyrics ( subtitle, with: track)
You can’t perform that action at this time.
0 commit comments