Skip to content

Commit

Permalink
feat(lyrics-plus): add select language translation for Musixmatch pro…
Browse files Browse the repository at this point in the history
…vider
  • Loading branch information
ianz56 committed Feb 4, 2025
1 parent 23600b4 commit 9fac241
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CustomApps/lyrics-plus/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,9 @@ const languageOptions = languageCodes.map((code) => ({
name: code === "none" ? "None" : displayNames.of(code),
}));

const savedLanguage = localStorage.getItem(`${APP_NAME}:visual:musixmatch-translation-language`) || "none";
CONFIG.visual["musixmatch-translation-language"] = savedLanguage;

console.log(languageOptions);

function openConfig() {
Expand Down Expand Up @@ -648,8 +651,7 @@ function openConfig() {
key: "musixmatch-translation-language",
type: ConfigSelection,
options: options,
defaultValue: (CONFIG.visual["musixmatch-translation-language"] =
localStorage.getItem(`${APP_NAME}:visual:musixmatch-translation-language`) || "none"),
defaultValue: savedLanguage,
},
],
onChange: (name, value) => {
Expand Down

0 comments on commit 9fac241

Please sign in to comment.