diff --git a/package.json b/package.json index 46490ab..05fa255 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spotify-lyrics", - "version": "1.6.6", + "version": "1.6.7", "description": "Desktop Spotify Web Player Instant Synchronized Lyrics", "scripts": { "lint": "tsc --noEmit && eslint --ext .ts --fix src/", diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index dffe1ca..0ffd394 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -128,6 +128,10 @@ "message": "Lyrics transform" }, + "optionsLyricsServer": { + "message": "Lyrics server" + }, + "optionsLyricsTransformDetail": { "message": "When using simplified Chinese, try to load the translated lyrics" }, diff --git a/public/_locales/zh/messages.json b/public/_locales/zh/messages.json index 7ea9d58..5826761 100644 --- a/public/_locales/zh/messages.json +++ b/public/_locales/zh/messages.json @@ -99,6 +99,10 @@ "message": "歌词转换" }, + "optionsLyricsServer": { + "message": "歌词服务" + }, + "optionsLyricsTransformDetail": { "message": "当使用简体中文时会尝试加载翻译的歌词" }, diff --git a/public/manifest.json b/public/manifest.json index 7078e0f..5214e4c 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/extend-chrome/manifest-json-schema/main/schema/manifest.schema.json", "name": "__MSG_extensionName__", - "version": "1.6.6", + "version": "1.6.7", "manifest_version": 3, "description": "__MSG_extensionDescription__", "default_locale": "en", diff --git a/src/common/constants.ts b/src/common/constants.ts index be5e795..8f56d17 100644 --- a/src/common/constants.ts +++ b/src/common/constants.ts @@ -38,6 +38,7 @@ export const LyricsPositions = ['page', 'pip'] as const; export const LyricsAlign = ['left', 'center'] as const; export const LyricsFontFamily = ['CircularSp', 'Sans-Serif', 'Serif', 'Cursive'] as const; export const LyricsTransform = ['Origin', 'Simplified', 'Traditional'] as const; +export const LyricsServer = ['NetEase', 'LRCLIB'] as const; export interface Options { cid: string; 'font-size': string; @@ -52,6 +53,7 @@ export interface Options { /**@deprecated */ 'traditional-chinese-lyrics': SwitchValue; 'lyrics-transform': (typeof LyricsTransform)[number]; + 'lyrics-server': (typeof LyricsServer)[number]; /**@deprecated */ 'lyrics-smooth-scroll'?: SwitchValue; 'strict-mode'?: SwitchValue; diff --git a/src/options/app.ts b/src/options/app.ts index 12688ab..0dbc6bb 100644 --- a/src/options/app.ts +++ b/src/options/app.ts @@ -7,6 +7,7 @@ import { LyricsAlign, LyricsFontFamily, LyricsTransform, + LyricsServer, } from '../common/constants'; import { sendEvent, events } from '../common/ga'; import { theme } from '../common/theme'; @@ -196,6 +197,13 @@ export class OptionsApp extends GemElement { default-value=${options['use-unreviewed-lyrics']} > + + ({ label: e, value: e }))} + > +