]> git.r.bdr.sh - rbdr/lyricli/commitdiff
Remove async lock even if track not found
authorBen Beltran <redacted>
Sat, 20 May 2017 16:19:19 +0000 (11:19 -0500)
committerBen Beltran <redacted>
Sat, 20 May 2017 16:19:19 +0000 (11:19 -0500)
Sources/lyrics_engine.swift

index 85e4735eaa00a5027f795285a65b46061d89bcf2..27e0e11f111b0eb86f75192a08824eed585027ef 100644 (file)
@@ -36,11 +36,9 @@ class LyricsEngine {
                     // Call the API and unlock when you're done
 
                     fetchLyricsFromAPI(withURL: url, completionHandler: {lyricsResult -> Void in
                     // Call the API and unlock when you're done
 
                     fetchLyricsFromAPI(withURL: url, completionHandler: {lyricsResult -> Void in
-                        if let lyricsResult = lyricsResult {
-                            lyrics = lyricsResult
-                            requestFinished = true
-                            asyncLock.signal()
-                        }
+                        lyrics = lyricsResult
+                        requestFinished = true
+                        asyncLock.signal()
                     })
 
                     while !requestFinished {
                     })
 
                     while !requestFinished {