mirror of
https://github.com/whoeevee/EeveeSpotifyReborn.git
synced 2026-01-08 23:23:20 +00:00
fix for #452
This commit is contained in:
@@ -111,13 +111,13 @@ class MusixmatchLyricsRepository: LyricsRepository {
|
||||
throw LyricsError.DecodingError
|
||||
}
|
||||
|
||||
let translations = translationsList.map {
|
||||
$0["translation"] as! [String: Any]
|
||||
let translations = translationsList.compactMap {
|
||||
$0["translation"] as? [String: Any]
|
||||
}
|
||||
|
||||
return Dictionary(uniqueKeysWithValues: translations.map {
|
||||
($0["subtitle_matched_line"] as! String, $0["description"] as! String)
|
||||
})
|
||||
return translations.reduce(into: [:]) { dictionary, translation in
|
||||
dictionary[translation["subtitle_matched_line"] as! String] = translation["description"] as? String
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user