Explorar o código

ref: rename setting

Sv443 hai 1 ano
pai
achega
ae4a26fd95

+ 3 - 3
assets/resources.json

@@ -1,17 +1,17 @@
 {
-  "css-fix_spacing": "style/fixSpacing.css",
   "css-anchor_improvements": "style/anchorImprovements.css",
+  "css-fix_spacing": "style/fixSpacing.css",
   "doc-changelog": "/changelog.md",
+  "icon-advanced_mode": "icons/plus_circle_small.svg",
   "icon-arrow_down": "icons/arrow_down.svg",
   "icon-delete": "icons/delete.svg",
   "icon-error": "icons/error.svg",
   "icon-globe": "icons/globe.svg",
   "icon-help": "icons/help.svg",
+  "icon-lock": "icons/lock.svg",
   "icon-lyrics": "icons/lyrics.svg",
   "icon-skip_to": "icons/skip_to.svg",
   "icon-spinner": "icons/spinner.svg",
-  "icon-advanced_mode": "icons/plus_circle_small.svg",
-  "icon-lock": "icons/lock.svg",
   "img-logo": "images/logo/logo_48.png",
   "img-close": "images/close.png",
   "img-discord": "images/external/discord.png",

+ 14 - 14
assets/translations/README.md

@@ -62,8 +62,8 @@ This means you need to manually check against the base translations for missing
 | `feature_desc_clearLyricsCache` | `Clear the lyrics cache manually` |
 | `feature_helptext_clearLyricsCache` | `If the lyrics that are in the local cache are outdated or you just want to free up some space, you can clear the cache manually by pressing this button.` |
 | `feature_btn_clearLyricsCache` | `Clear cache` |
-| `feature_desc_lyricsFuzzyFilter` | `Experimental: Enable fuzzy filtering for the lyrics search` |
-| `feature_helptext_lyricsFuzzyFilter` | `Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.` |
+| `feature_desc_advancedLyricsFilter` | `Experimental: Enable fuzzy filtering for the lyrics search` |
+| `feature_helptext_advancedLyricsFilter` | `Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.` |
 | `feature_desc_checkVersionNow` | `Manually check for a new version` |
 | `feature_btn_checkVersionNow` | `Check now` |
 | `feature_desc_advancedMode` | `Show advanced settings (after reload)` |
@@ -108,8 +108,8 @@ This means you need to manually check against the base translations for missing
 | `feature_desc_clearLyricsCache` | `Clear the lyrics cache manually` |
 | `feature_helptext_clearLyricsCache` | `If the lyrics that are in the local cache are outdated or you just want to free up some space, you can clear the cache manually by pressing this button.` |
 | `feature_btn_clearLyricsCache` | `Clear cache` |
-| `feature_desc_lyricsFuzzyFilter` | `Experimental: Enable fuzzy filtering for the lyrics search` |
-| `feature_helptext_lyricsFuzzyFilter` | `Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.` |
+| `feature_desc_advancedLyricsFilter` | `Experimental: Enable fuzzy filtering for the lyrics search` |
+| `feature_helptext_advancedLyricsFilter` | `Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.` |
 | `feature_desc_checkVersionNow` | `Manually check for a new version` |
 | `feature_btn_checkVersionNow` | `Check now` |
 | `feature_desc_advancedMode` | `Show advanced settings (after reload)` |
@@ -154,8 +154,8 @@ This means you need to manually check against the base translations for missing
 | `feature_desc_clearLyricsCache` | `Clear the lyrics cache manually` |
 | `feature_helptext_clearLyricsCache` | `If the lyrics that are in the local cache are outdated or you just want to free up some space, you can clear the cache manually by pressing this button.` |
 | `feature_btn_clearLyricsCache` | `Clear cache` |
-| `feature_desc_lyricsFuzzyFilter` | `Experimental: Enable fuzzy filtering for the lyrics search` |
-| `feature_helptext_lyricsFuzzyFilter` | `Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.` |
+| `feature_desc_advancedLyricsFilter` | `Experimental: Enable fuzzy filtering for the lyrics search` |
+| `feature_helptext_advancedLyricsFilter` | `Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.` |
 | `feature_desc_checkVersionNow` | `Manually check for a new version` |
 | `feature_btn_checkVersionNow` | `Check now` |
 | `feature_desc_advancedMode` | `Show advanced settings (after reload)` |
@@ -200,8 +200,8 @@ This means you need to manually check against the base translations for missing
 | `feature_desc_clearLyricsCache` | `Clear the lyrics cache manually` |
 | `feature_helptext_clearLyricsCache` | `If the lyrics that are in the local cache are outdated or you just want to free up some space, you can clear the cache manually by pressing this button.` |
 | `feature_btn_clearLyricsCache` | `Clear cache` |
-| `feature_desc_lyricsFuzzyFilter` | `Experimental: Enable fuzzy filtering for the lyrics search` |
-| `feature_helptext_lyricsFuzzyFilter` | `Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.` |
+| `feature_desc_advancedLyricsFilter` | `Experimental: Enable fuzzy filtering for the lyrics search` |
+| `feature_helptext_advancedLyricsFilter` | `Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.` |
 | `feature_desc_checkVersionNow` | `Manually check for a new version` |
 | `feature_btn_checkVersionNow` | `Check now` |
 | `feature_desc_advancedMode` | `Show advanced settings (after reload)` |
@@ -246,8 +246,8 @@ This means you need to manually check against the base translations for missing
 | `feature_desc_clearLyricsCache` | `Clear the lyrics cache manually` |
 | `feature_helptext_clearLyricsCache` | `If the lyrics that are in the local cache are outdated or you just want to free up some space, you can clear the cache manually by pressing this button.` |
 | `feature_btn_clearLyricsCache` | `Clear cache` |
-| `feature_desc_lyricsFuzzyFilter` | `Experimental: Enable fuzzy filtering for the lyrics search` |
-| `feature_helptext_lyricsFuzzyFilter` | `Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.` |
+| `feature_desc_advancedLyricsFilter` | `Experimental: Enable fuzzy filtering for the lyrics search` |
+| `feature_helptext_advancedLyricsFilter` | `Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.` |
 | `feature_desc_checkVersionNow` | `Manually check for a new version` |
 | `feature_btn_checkVersionNow` | `Check now` |
 | `feature_desc_advancedMode` | `Show advanced settings (after reload)` |
@@ -292,8 +292,8 @@ This means you need to manually check against the base translations for missing
 | `feature_desc_clearLyricsCache` | `Clear the lyrics cache manually` |
 | `feature_helptext_clearLyricsCache` | `If the lyrics that are in the local cache are outdated or you just want to free up some space, you can clear the cache manually by pressing this button.` |
 | `feature_btn_clearLyricsCache` | `Clear cache` |
-| `feature_desc_lyricsFuzzyFilter` | `Experimental: Enable fuzzy filtering for the lyrics search` |
-| `feature_helptext_lyricsFuzzyFilter` | `Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.` |
+| `feature_desc_advancedLyricsFilter` | `Experimental: Enable fuzzy filtering for the lyrics search` |
+| `feature_helptext_advancedLyricsFilter` | `Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.` |
 | `feature_desc_checkVersionNow` | `Manually check for a new version` |
 | `feature_btn_checkVersionNow` | `Check now` |
 | `feature_desc_advancedMode` | `Show advanced settings (after reload)` |
@@ -338,8 +338,8 @@ This means you need to manually check against the base translations for missing
 | `feature_desc_clearLyricsCache` | `Clear the lyrics cache manually` |
 | `feature_helptext_clearLyricsCache` | `If the lyrics that are in the local cache are outdated or you just want to free up some space, you can clear the cache manually by pressing this button.` |
 | `feature_btn_clearLyricsCache` | `Clear cache` |
-| `feature_desc_lyricsFuzzyFilter` | `Experimental: Enable fuzzy filtering for the lyrics search` |
-| `feature_helptext_lyricsFuzzyFilter` | `Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.` |
+| `feature_desc_advancedLyricsFilter` | `Experimental: Enable fuzzy filtering for the lyrics search` |
+| `feature_helptext_advancedLyricsFilter` | `Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.` |
 | `feature_desc_checkVersionNow` | `Manually check for a new version` |
 | `feature_btn_checkVersionNow` | `Check now` |
 | `feature_desc_advancedMode` | `Show advanced settings (after reload)` |

+ 2 - 2
assets/translations/en_US.json

@@ -165,8 +165,8 @@
     "feature_desc_clearLyricsCache": "Clear the lyrics cache manually",
     "feature_helptext_clearLyricsCache": "If the lyrics that are in the local cache are outdated or you just want to free up some space, you can clear the cache manually by pressing this button.",
     "feature_btn_clearLyricsCache": "Clear cache",
-    "feature_desc_lyricsFuzzyFilter": "Experimental: Enable fuzzy filtering for the lyrics search",
-    "feature_helptext_lyricsFuzzyFilter": "Fuzzy filtering allows you to find lyrics even if the song title or artist name is misspelled or slightly different from the actual title or artist name.\nThis feature is experimental and might not work as expected.",
+    "feature_desc_advancedLyricsFilter": "Experimental: Enable advanced filtering for the lyrics search",
+    "feature_helptext_advancedLyricsFilter": "Advanced filtering includes multiple layers of filters that aim to make the lyrics lookups more reliable.\nThese filters may not work well for songs in your language, and songs and artists with less unique titles in general.\nWarning: This feature is still experimental and might not actually perform any better than the default lyrics lookup. Make sure to confirm the prompt that asks about clearing the cache after changing this setting if you want.",
 
     "feature_desc_locale": "Language",
     "feature_desc_versionCheck": "Check for updates every 24 hours",

+ 1 - 1
src/config.ts

@@ -52,7 +52,7 @@ export const migrations: ConfigMigrationsDict = {
     "lyricsCacheMaxSize", "lyricsCacheTTL",
     "clearLyricsCache", "advancedMode",
     "lockVolume", "lockVolumeLevel",
-    "checkVersionNow", "lyricsFuzzyFilter",
+    "checkVersionNow", "advancedLyricsFilter",
   ], oldData),
 };
 

+ 1 - 1
src/features/index.ts

@@ -347,7 +347,7 @@ export const featInfo = {
     // TODO: to be reworked or removed in the big menu rework
     textAdornment: adornments.advancedMode,
   },
-  lyricsFuzzyFilter: {
+  advancedLyricsFilter: {
     type: "toggle",
     category: "lyrics",
     default: false,

+ 1 - 1
src/features/lyrics.ts

@@ -281,7 +281,7 @@ export async function fetchLyricsUrls(artist: string, song: string): Promise<Omi
         url,
       }));
 
-    if(!getFeatures().lyricsFuzzyFilter)
+    if(!getFeatures().advancedLyricsFilter)
       return allResultsSan.map(r => ({
         artist: r.meta.primaryArtist.name,
         song: r.meta.title,

+ 2 - 2
src/types.ts

@@ -273,8 +273,8 @@ export interface FeatureConfig {
   lyricsCacheTTL: number;
   /** Button to clear lyrics cache */
   clearLyricsCache: undefined;
-  /** Whether to use fuzzy filtering when searching for lyrics */
-  lyricsFuzzyFilter: boolean;
+  /** Whether to use advanced filtering when searching for lyrics (exact, exact-ish) */
+  advancedLyricsFilter: boolean;
 
   //#SECTION misc
   /** The locale to use for translations */