Skip to content

Commit cf3bea0

Browse files
committed
refactor(lyrics-plus): remove obsolete Musixmatch translation language setting
1 parent a208710 commit cf3bea0

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

CustomApps/lyrics-plus/Settings.js

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -547,17 +547,6 @@ const OptionList = ({ type, items, onChange }) => {
547547
});
548548
};
549549

550-
const languageCodes =
551-
"none,en,af,ar,bg,bn,ca,zh,cs,da,de,el,es,et,fa,fi,fr,gu,he,hi,hr,hu,id,is,it,ja,jv,kn,ko,lt,lv,ml,mr,ms,nl,no,pl,pt,ro,ru,sk,sl,sr,su,sv,ta,te,th,tr,uk,ur,vi,zu".split(
552-
","
553-
);
554-
555-
const displayNames = new Intl.DisplayNames(["en"], { type: "language" });
556-
const languageOptions = languageCodes.reduce((acc, code) => {
557-
acc[code] = code === "none" ? "None" : displayNames.of(code);
558-
return acc;
559-
}, {});
560-
561550
function openConfig() {
562551
const configContainer = react.createElement(
563552
"div",
@@ -675,13 +664,6 @@ function openConfig() {
675664
max: thresholdSizeLimit.max,
676665
step: thresholdSizeLimit.step,
677666
},
678-
{
679-
desc: "Musixmatch Translation Language.",
680-
info: "Choose the language you want to translate the lyrics to. When the language is changed, the lyrics reloads.",
681-
key: "musixmatch-translation-language",
682-
type: ConfigSelection,
683-
options: languageOptions,
684-
},
685667
{
686668
desc: "Clear Memory Cache",
687669
info: "Loaded lyrics are cached in memory for faster reloading. Press this button to clear the cached lyrics from memory without restarting Spotify.",
@@ -696,17 +678,7 @@ function openConfig() {
696678
onChange: (name, value) => {
697679
CONFIG.visual[name] = value;
698680
localStorage.setItem(`${APP_NAME}:visual:${name}`, value);
699-
700-
// Reload Lyrics if translation language is changed
701-
if (name === "musixmatch-translation-language") {
702-
if (value === "none") {
703-
CONFIG.visual["translate:translated-lyrics-source"] = "none";
704-
localStorage.setItem(`${APP_NAME}:visual:translate:translated-lyrics-source`, "none");
705-
}
706-
lyricContainerUpdate?.();
707-
} else {
708-
lyricContainerUpdate?.();
709-
}
681+
lyricContainerUpdate?.();
710682

711683
const configChange = new CustomEvent("lyrics-plus", {
712684
detail: {

0 commit comments

Comments
 (0)