File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Sources/LyricsService/Provider/Services Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -26,9 +26,11 @@ extension LyricsProviders.Spotify: _LyricsProvider {
2626 let url : URL
2727 switch request. searchTerm {
2828 case . keyword( let string) :
29- url = URL ( string: " https://api.spotify.com/v1/search?q=track: \( string) &type=track&limit= \( request. limit) " ) !
29+ guard let _url = URL ( string: " https://api.spotify.com/v1/search?q=track: \( string) &type=track&limit= \( request. limit) " ) else { return [ ] }
30+ url = _url
3031 case . info( let title, let artist) :
31- url = URL ( string: " https://api.spotify.com/v1/search?q=track: \( title) artist: \( artist) &type=track&limit= \( request. limit) " ) !
32+ guard let _url = URL ( string: " https://api.spotify.com/v1/search?q=track: \( title) artist: \( artist) &type=track&limit= \( request. limit) " ) else { return [ ] }
33+ url = _url
3234 }
3335
3436 var req = URLRequest ( url: url)
You can’t perform that action at this time.
0 commit comments