mirror of
https://github.com/whoeevee/EeveeSpotifyReborn.git
synced 2026-01-09 00:23:20 +01:00
musixmatch language codes are crazy
This commit is contained in:
@@ -14,10 +14,10 @@ extension UIColor {
|
||||
red: r1 * (1.0 - amount) + r2 * amount,
|
||||
green: g1 * (1.0 - amount) + g2 * amount,
|
||||
blue: b1 * (1.0 - amount) + b2 * amount,
|
||||
alpha: a1
|
||||
alpha: a1 * (1.0 - amount) + a2 * amount
|
||||
)
|
||||
}
|
||||
|
||||
func lighter(by amount: CGFloat = 0.2) -> Self { mix(with: .white, amount: amount) }
|
||||
func darker(by amount: CGFloat = 0.2) -> Self { mix(with: .black, amount: amount) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ struct EeveeLyricsSettingsView: View {
|
||||
.foregroundColor(.gray)
|
||||
}
|
||||
} footer: {
|
||||
Text("You can enter a 2-letter ISO language code and see translated lyrics on Musixmatch if they are available. It overrides Romanized Lyrics.")
|
||||
Text("You can enter a 2-letter Musixmatch language code and see translated lyrics on Musixmatch if they are available. It overrides Romanized Lyrics.")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ struct EeveeLyricsSettingsView: View {
|
||||
|
||||
let selectedLanguage = lyricsOptions.musixmatchLanguage
|
||||
|
||||
if selectedLanguage.isEmpty || Locale.isoLanguageCodes.contains(selectedLanguage) {
|
||||
if selectedLanguage.isEmpty || selectedLanguage ~= "^[\\w\\d]{2}$" {
|
||||
showLanguageWarning = false
|
||||
|
||||
MusixmatchLyricsRepository.shared.selectedLanguage = selectedLanguage
|
||||
|
||||
Reference in New Issue
Block a user