mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-03-09 21:03:55 +00:00
Compare commits
2 Commits
6915c3ad61
...
4f7e8dafff
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f7e8dafff | |||
| 208e57bdd3 |
@ -89,6 +89,7 @@
|
||||
"bgutils-js": "3.2.0",
|
||||
"butterchurn": "3.0.0-beta.5",
|
||||
"butterchurn-presets": "3.0.0-beta.4",
|
||||
"chinese-conv": "^4.0.0",
|
||||
"color": "5.0.3",
|
||||
"conf": "15.0.2",
|
||||
"custom-electron-prompt": "1.6.1",
|
||||
@ -121,6 +122,7 @@
|
||||
"node-html-parser": "7.0.2",
|
||||
"node-id3": "0.2.9",
|
||||
"peerjs": "1.5.5",
|
||||
"pinyin-pro": "^3.27.0",
|
||||
"semver": "7.7.3",
|
||||
"serve": "14.2.5",
|
||||
"socks": "2.8.7",
|
||||
@ -129,7 +131,6 @@
|
||||
"solid-js": "1.9.11",
|
||||
"solid-styled-components": "0.28.5",
|
||||
"solid-transition-group": "0.3.0",
|
||||
"tiny-pinyin": "1.3.2",
|
||||
"tinyld": "1.3.4",
|
||||
"virtua": "0.48.5",
|
||||
"vudio": "2.1.1",
|
||||
@ -166,7 +167,7 @@
|
||||
"eslint-plugin-import": "2.32.0",
|
||||
"eslint-plugin-prettier": "5.5.5",
|
||||
"eslint-plugin-solid": "0.14.5",
|
||||
"glob": "13.0.0",
|
||||
"glob": "13.0.3",
|
||||
"node-gyp": "12.2.0",
|
||||
"ts-morph": "27.0.2",
|
||||
"typescript": "5.9.3",
|
||||
|
||||
129
pnpm-lock.yaml
generated
129
pnpm-lock.yaml
generated
@ -114,6 +114,9 @@ importers:
|
||||
butterchurn-presets:
|
||||
specifier: 3.0.0-beta.4
|
||||
version: 3.0.0-beta.4
|
||||
chinese-conv:
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
color:
|
||||
specifier: 5.0.3
|
||||
version: 5.0.3
|
||||
@ -210,6 +213,9 @@ importers:
|
||||
peerjs:
|
||||
specifier: 1.5.5
|
||||
version: 1.5.5
|
||||
pinyin-pro:
|
||||
specifier: ^3.27.0
|
||||
version: 3.27.0
|
||||
semver:
|
||||
specifier: 7.7.3
|
||||
version: 7.7.3
|
||||
@ -234,9 +240,6 @@ importers:
|
||||
solid-transition-group:
|
||||
specifier: 0.3.0
|
||||
version: 0.3.0(solid-js@1.9.11)
|
||||
tiny-pinyin:
|
||||
specifier: 1.3.2
|
||||
version: 1.3.2
|
||||
tinyld:
|
||||
specifier: 1.3.4
|
||||
version: 1.3.4
|
||||
@ -338,8 +341,8 @@ importers:
|
||||
specifier: 0.14.5
|
||||
version: 0.14.5(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||
glob:
|
||||
specifier: 13.0.0
|
||||
version: 13.0.0
|
||||
specifier: 13.0.3
|
||||
version: 13.0.3
|
||||
node-gyp:
|
||||
specifier: 12.2.0
|
||||
version: 12.2.0
|
||||
@ -852,17 +855,9 @@ packages:
|
||||
'@indic-transliteration/sanscript@1.3.3':
|
||||
resolution: {integrity: sha512-zNGeARmQTPIlubwgEhl/JumpwTPHrdT/cNsQeCL+G67SQmjJe3qRnMIYghXiVt7+KDso/pU1Ky2ZfD/RBISfJQ==}
|
||||
|
||||
'@isaacs/balanced-match@4.0.1':
|
||||
resolution: {integrity: sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==}
|
||||
engines: {node: 20 || >=22}
|
||||
|
||||
'@isaacs/brace-expansion@5.0.0':
|
||||
resolution: {integrity: sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==}
|
||||
engines: {node: 20 || >=22}
|
||||
|
||||
'@isaacs/cliui@8.0.2':
|
||||
resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
|
||||
engines: {node: '>=12'}
|
||||
'@isaacs/cliui@9.0.0':
|
||||
resolution: {integrity: sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
'@isaacs/fs-minipass@4.0.1':
|
||||
resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==}
|
||||
@ -1306,9 +1301,6 @@ packages:
|
||||
'@types/node@24.10.9':
|
||||
resolution: {integrity: sha512-ne4A0IpG3+2ETuREInjPNhUGis1SFjv1d5asp8MzEAGtOZeTeHVDOYqOgqfhvseqg/iXty2hjBf1zAOb7RNiNw==}
|
||||
|
||||
'@types/node@25.1.0':
|
||||
resolution: {integrity: sha512-t7frlewr6+cbx+9Ohpl0NOTKXZNV9xHRmNOvql47BFJKcEG1CxtxlPEEe+gR9uhVWM4DwhnvTF110mIL4yP9RA==}
|
||||
|
||||
'@types/node@25.2.0':
|
||||
resolution: {integrity: sha512-DZ8VwRFUNzuqJ5khrvwMXHmvPe+zGayJhr2CDNiKB1WBE1ST8Djl00D0IC4vvNmHMdj6DlbYRIaFE7WHjlDl5w==}
|
||||
|
||||
@ -1686,6 +1678,10 @@ packages:
|
||||
balanced-match@1.0.2:
|
||||
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
|
||||
|
||||
balanced-match@4.0.2:
|
||||
resolution: {integrity: sha512-x0K50QvKQ97fdEz2kPehIerj+YTeptKF9hyYkKf6egnwmMWAkADiO0QCzSp0R5xN8FTZgYaBfSaue46Ej62nMg==}
|
||||
engines: {node: 20 || >=22}
|
||||
|
||||
base64-js@1.5.1:
|
||||
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
|
||||
|
||||
@ -1722,6 +1718,10 @@ packages:
|
||||
brace-expansion@2.0.2:
|
||||
resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==}
|
||||
|
||||
brace-expansion@5.0.2:
|
||||
resolution: {integrity: sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==}
|
||||
engines: {node: 20 || >=22}
|
||||
|
||||
braces@3.0.3:
|
||||
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
|
||||
engines: {node: '>=8'}
|
||||
@ -1830,6 +1830,10 @@ packages:
|
||||
resolution: {integrity: sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==}
|
||||
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
|
||||
|
||||
chinese-conv@4.0.0:
|
||||
resolution: {integrity: sha512-PVBMzvv6CtX1cubaDXfxYscIdbOAHPuY/E2vnfJIzOACX+xIW4NRKRlNsZVI2p5KxGsXyUp7tVHfvQlqZ4yx/w==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
|
||||
chownr@3.0.0:
|
||||
resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==}
|
||||
engines: {node: '>=18'}
|
||||
@ -2701,16 +2705,16 @@ packages:
|
||||
glob@11.1.0:
|
||||
resolution: {integrity: sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==}
|
||||
engines: {node: 20 || >=22}
|
||||
deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
|
||||
hasBin: true
|
||||
|
||||
glob@13.0.0:
|
||||
resolution: {integrity: sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==}
|
||||
glob@13.0.3:
|
||||
resolution: {integrity: sha512-/g3B0mC+4x724v1TgtBlBtt2hPi/EWptsIAmXUx9Z2rvBYleQcsrmaOzd5LyL50jf/Soi83ZDJmw2+XqvH/EeA==}
|
||||
engines: {node: 20 || >=22}
|
||||
hasBin: true
|
||||
|
||||
glob@7.2.3:
|
||||
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
|
||||
deprecated: Glob versions prior to v9 are no longer supported
|
||||
deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
|
||||
|
||||
global-agent@3.0.0:
|
||||
resolution: {integrity: sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==}
|
||||
@ -3086,8 +3090,8 @@ packages:
|
||||
resolution: {integrity: sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==}
|
||||
engines: {node: '>=16'}
|
||||
|
||||
jackspeak@4.1.1:
|
||||
resolution: {integrity: sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==}
|
||||
jackspeak@4.2.3:
|
||||
resolution: {integrity: sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==}
|
||||
engines: {node: 20 || >=22}
|
||||
|
||||
jake@10.9.4:
|
||||
@ -3419,8 +3423,8 @@ packages:
|
||||
resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
minimatch@10.1.1:
|
||||
resolution: {integrity: sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==}
|
||||
minimatch@10.2.0:
|
||||
resolution: {integrity: sha512-ugkC31VaVg9cF0DFVoADH12k6061zNZkZON+aX8AWsR9GhPcErkcMBceb6znR8wLERM2AkkOxy2nWRLpT9Jq5w==}
|
||||
engines: {node: 20 || >=22}
|
||||
|
||||
minimatch@3.1.2:
|
||||
@ -3740,6 +3744,9 @@ packages:
|
||||
resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
pinyin-pro@3.27.0:
|
||||
resolution: {integrity: sha512-Osdgjwe7Rm17N2paDMM47yW+jUIUH3+0RGo8QP39ZTLpTaJVDK0T58hOLaMQJbcMmAebVuK2ePunTEVEx1clNQ==}
|
||||
|
||||
pixelmatch@5.3.0:
|
||||
resolution: {integrity: sha512-o8mkY4E/+LNUf6LzX96ht6k6CEDi65k9G2rjMtBe9Oo+VPKSvl+0GKHuH/AlG+GA5LPG/i5hrekkxUc3s2HU+Q==}
|
||||
hasBin: true
|
||||
@ -4308,9 +4315,6 @@ packages:
|
||||
tiny-async-pool@1.3.0:
|
||||
resolution: {integrity: sha512-01EAw5EDrcVrdgyCLgoSPvqznC0sVxDSVeiOz09FUpjh71G79VCqneOr+xvt7T1r76CF6ZZfPjHorN2+d+3mqA==}
|
||||
|
||||
tiny-pinyin@1.3.2:
|
||||
resolution: {integrity: sha512-uHNGu4evFt/8eNLldazeAM1M8JrMc1jshhJJfVRARTN3yT8HEEibofeQ7QETWQ5ISBjd6fKtTVBCC/+mGS6FpA==}
|
||||
|
||||
tiny-typed-emitter@2.1.0:
|
||||
resolution: {integrity: sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA==}
|
||||
|
||||
@ -4883,7 +4887,7 @@ snapshots:
|
||||
dependencies:
|
||||
commander: 13.1.0
|
||||
glob: 11.1.0
|
||||
minimatch: 10.1.1
|
||||
minimatch: 10.2.0
|
||||
|
||||
'@electron/fuses@1.8.0':
|
||||
dependencies:
|
||||
@ -5225,20 +5229,7 @@ snapshots:
|
||||
'@indic-transliteration/common_maps': 1.0.5
|
||||
toml: 2.3.6
|
||||
|
||||
'@isaacs/balanced-match@4.0.1': {}
|
||||
|
||||
'@isaacs/brace-expansion@5.0.0':
|
||||
dependencies:
|
||||
'@isaacs/balanced-match': 4.0.1
|
||||
|
||||
'@isaacs/cliui@8.0.2':
|
||||
dependencies:
|
||||
string-width: 5.1.2
|
||||
string-width-cjs: string-width@4.2.3
|
||||
strip-ansi: 7.1.2
|
||||
strip-ansi-cjs: strip-ansi@6.0.1
|
||||
wrap-ansi: 8.1.0
|
||||
wrap-ansi-cjs: wrap-ansi@7.0.0
|
||||
'@isaacs/cliui@9.0.0': {}
|
||||
|
||||
'@isaacs/fs-minipass@4.0.1':
|
||||
dependencies:
|
||||
@ -5682,7 +5673,7 @@ snapshots:
|
||||
|
||||
'@ts-morph/common@0.28.1':
|
||||
dependencies:
|
||||
minimatch: 10.1.1
|
||||
minimatch: 10.2.0
|
||||
path-browserify: 1.0.1
|
||||
tinyglobby: 0.2.15
|
||||
|
||||
@ -5716,7 +5707,7 @@ snapshots:
|
||||
dependencies:
|
||||
'@types/http-cache-semantics': 4.2.0
|
||||
'@types/keyv': 3.1.4
|
||||
'@types/node': 25.1.0
|
||||
'@types/node': 25.2.0
|
||||
'@types/responselike': 1.0.3
|
||||
|
||||
'@types/debug@4.1.12':
|
||||
@ -5747,7 +5738,7 @@ snapshots:
|
||||
|
||||
'@types/keyv@3.1.4':
|
||||
dependencies:
|
||||
'@types/node': 25.1.0
|
||||
'@types/node': 25.2.0
|
||||
|
||||
'@types/ms@2.1.0': {}
|
||||
|
||||
@ -5757,10 +5748,6 @@ snapshots:
|
||||
dependencies:
|
||||
undici-types: 7.16.0
|
||||
|
||||
'@types/node@25.1.0':
|
||||
dependencies:
|
||||
undici-types: 7.16.0
|
||||
|
||||
'@types/node@25.2.0':
|
||||
dependencies:
|
||||
undici-types: 7.16.0
|
||||
@ -5773,7 +5760,7 @@ snapshots:
|
||||
|
||||
'@types/responselike@1.0.3':
|
||||
dependencies:
|
||||
'@types/node': 25.1.0
|
||||
'@types/node': 25.2.0
|
||||
|
||||
'@types/semver@7.7.1': {}
|
||||
|
||||
@ -5790,7 +5777,7 @@ snapshots:
|
||||
|
||||
'@types/yauzl@2.10.3':
|
||||
dependencies:
|
||||
'@types/node': 25.1.0
|
||||
'@types/node': 25.2.0
|
||||
optional: true
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.54.0(@typescript-eslint/parser@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)':
|
||||
@ -6053,7 +6040,7 @@ snapshots:
|
||||
js-yaml: 4.1.1
|
||||
json5: 2.2.3
|
||||
lazy-val: 1.0.5
|
||||
minimatch: 10.1.1
|
||||
minimatch: 10.2.0
|
||||
plist: 3.1.0
|
||||
proper-lockfile: 4.1.2
|
||||
resedit: 1.7.2
|
||||
@ -6174,6 +6161,10 @@ snapshots:
|
||||
|
||||
balanced-match@1.0.2: {}
|
||||
|
||||
balanced-match@4.0.2:
|
||||
dependencies:
|
||||
jackspeak: 4.2.3
|
||||
|
||||
base64-js@1.5.1: {}
|
||||
|
||||
baseline-browser-mapping@2.9.19: {}
|
||||
@ -6215,6 +6206,10 @@ snapshots:
|
||||
dependencies:
|
||||
balanced-match: 1.0.2
|
||||
|
||||
brace-expansion@5.0.2:
|
||||
dependencies:
|
||||
balanced-match: 4.0.2
|
||||
|
||||
braces@3.0.3:
|
||||
dependencies:
|
||||
fill-range: 7.1.1
|
||||
@ -6303,7 +6298,7 @@ snapshots:
|
||||
dependencies:
|
||||
'@npmcli/fs': 5.0.0
|
||||
fs-minipass: 3.0.3
|
||||
glob: 13.0.0
|
||||
glob: 13.0.3
|
||||
lru-cache: 11.2.5
|
||||
minipass: 7.1.2
|
||||
minipass-collect: 2.0.1
|
||||
@ -6359,6 +6354,8 @@ snapshots:
|
||||
|
||||
chalk@5.0.1: {}
|
||||
|
||||
chinese-conv@4.0.0: {}
|
||||
|
||||
chownr@3.0.0: {}
|
||||
|
||||
chromium-pickle-js@0.2.0: {}
|
||||
@ -7440,15 +7437,15 @@ snapshots:
|
||||
glob@11.1.0:
|
||||
dependencies:
|
||||
foreground-child: 3.3.1
|
||||
jackspeak: 4.1.1
|
||||
minimatch: 10.1.1
|
||||
jackspeak: 4.2.3
|
||||
minimatch: 10.2.0
|
||||
minipass: 7.1.2
|
||||
package-json-from-dist: 1.0.1
|
||||
path-scurry: 2.0.1
|
||||
|
||||
glob@13.0.0:
|
||||
glob@13.0.3:
|
||||
dependencies:
|
||||
minimatch: 10.1.1
|
||||
minimatch: 10.2.0
|
||||
minipass: 7.1.2
|
||||
path-scurry: 2.0.1
|
||||
|
||||
@ -7824,9 +7821,9 @@ snapshots:
|
||||
|
||||
isexe@3.1.1: {}
|
||||
|
||||
jackspeak@4.1.1:
|
||||
jackspeak@4.2.3:
|
||||
dependencies:
|
||||
'@isaacs/cliui': 8.0.2
|
||||
'@isaacs/cliui': 9.0.0
|
||||
|
||||
jake@10.9.4:
|
||||
dependencies:
|
||||
@ -8143,9 +8140,9 @@ snapshots:
|
||||
|
||||
mimic-response@3.1.0: {}
|
||||
|
||||
minimatch@10.1.1:
|
||||
minimatch@10.2.0:
|
||||
dependencies:
|
||||
'@isaacs/brace-expansion': 5.0.0
|
||||
brace-expansion: 5.0.2
|
||||
|
||||
minimatch@3.1.2:
|
||||
dependencies:
|
||||
@ -8458,6 +8455,8 @@ snapshots:
|
||||
|
||||
picomatch@4.0.3: {}
|
||||
|
||||
pinyin-pro@3.27.0: {}
|
||||
|
||||
pixelmatch@5.3.0:
|
||||
dependencies:
|
||||
pngjs: 6.0.0
|
||||
@ -9070,8 +9069,6 @@ snapshots:
|
||||
dependencies:
|
||||
semver: 5.7.2
|
||||
|
||||
tiny-pinyin@1.3.2: {}
|
||||
|
||||
tiny-typed-emitter@2.1.0: {}
|
||||
|
||||
tinycolor2@1.6.0: {}
|
||||
|
||||
@ -891,6 +891,24 @@
|
||||
"show-time-codes": {
|
||||
"label": "Show time codes",
|
||||
"tooltip": "Show the time codes next to the lyrics"
|
||||
},
|
||||
"convert-chinese-character": {
|
||||
"label": "Convert Chinese character",
|
||||
"submenu": {
|
||||
"disabled": {
|
||||
"label": "Disabled",
|
||||
"tooltip": "Disable Chinese character conversion"
|
||||
},
|
||||
"simplified-to-traditional": {
|
||||
"label": "Simplified to Traditional",
|
||||
"tooltip": "Convert Simplified Chinese to Traditional Chinese"
|
||||
},
|
||||
"traditional-to-simplified": {
|
||||
"label": "Traditional to Simplified",
|
||||
"tooltip": "Convert Traditional Chinese to Simplified Chinese"
|
||||
}
|
||||
},
|
||||
"tooltip": "Convert Chinese character to Traditional or Simplified"
|
||||
}
|
||||
},
|
||||
"name": "Synced Lyrics",
|
||||
|
||||
@ -153,6 +153,62 @@ export const menu = async (
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('plugins.synced-lyrics.menu.convert-chinese-character.label'),
|
||||
toolTip: t(
|
||||
'plugins.synced-lyrics.menu.convert-chinese-character.tooltip',
|
||||
),
|
||||
type: 'submenu',
|
||||
submenu: [
|
||||
{
|
||||
label: t(
|
||||
'plugins.synced-lyrics.menu.convert-chinese-character.submenu.disabled.label',
|
||||
),
|
||||
toolTip: t(
|
||||
'plugins.synced-lyrics.menu.convert-chinese-character.submenu.disabled.tooltip',
|
||||
),
|
||||
type: 'radio',
|
||||
checked:
|
||||
config.convertChineseCharacter === 'disabled' ||
|
||||
config.convertChineseCharacter === undefined,
|
||||
click() {
|
||||
ctx.setConfig({
|
||||
convertChineseCharacter: 'disabled',
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t(
|
||||
'plugins.synced-lyrics.menu.convert-chinese-character.submenu.simplified-to-traditional.label',
|
||||
),
|
||||
toolTip: t(
|
||||
'plugins.synced-lyrics.menu.convert-chinese-character.submenu.simplified-to-traditional.tooltip',
|
||||
),
|
||||
type: 'radio',
|
||||
checked: config.convertChineseCharacter === 'simplifiedToTraditional',
|
||||
click() {
|
||||
ctx.setConfig({
|
||||
convertChineseCharacter: 'simplifiedToTraditional',
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t(
|
||||
'plugins.synced-lyrics.menu.convert-chinese-character.submenu.traditional-to-simplified.label',
|
||||
),
|
||||
toolTip: t(
|
||||
'plugins.synced-lyrics.menu.convert-chinese-character.submenu.traditional-to-simplified.tooltip',
|
||||
),
|
||||
type: 'radio',
|
||||
checked: config.convertChineseCharacter === 'traditionalToSimplified',
|
||||
click() {
|
||||
ctx.setConfig({
|
||||
convertChineseCharacter: 'traditionalToSimplified',
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: t('plugins.synced-lyrics.menu.show-time-codes.label'),
|
||||
toolTip: t('plugins.synced-lyrics.menu.show-time-codes.tooltip'),
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
import { createEffect, createSignal, Show } from 'solid-js';
|
||||
import { createEffect, createMemo, createSignal, Show } from 'solid-js';
|
||||
|
||||
import { canonicalize, romanize, simplifyUnicode } from '../utils';
|
||||
import {
|
||||
canonicalize,
|
||||
convertChineseCharacter,
|
||||
romanize,
|
||||
simplifyUnicode,
|
||||
} from '../utils';
|
||||
import { config } from '../renderer';
|
||||
|
||||
interface PlainLyricsProps {
|
||||
@ -9,11 +14,19 @@ interface PlainLyricsProps {
|
||||
|
||||
export const PlainLyrics = (props: PlainLyricsProps) => {
|
||||
const [romanization, setRomanization] = createSignal('');
|
||||
const text = createMemo(() => {
|
||||
let line = props.line;
|
||||
const convertChineseText = config()?.convertChineseCharacter;
|
||||
if (convertChineseText && convertChineseText !== 'disabled') {
|
||||
line = convertChineseCharacter(line, convertChineseText);
|
||||
}
|
||||
return line;
|
||||
});
|
||||
|
||||
createEffect(() => {
|
||||
if (!config()?.romanization) return;
|
||||
|
||||
const input = canonicalize(props.line);
|
||||
const input = canonicalize(text());
|
||||
romanize(input).then((result) => {
|
||||
setRomanization(canonicalize(result));
|
||||
});
|
||||
@ -31,13 +44,13 @@ export const PlainLyrics = (props: PlainLyricsProps) => {
|
||||
>
|
||||
<yt-formatted-string
|
||||
text={{
|
||||
runs: [{ text: props.line }],
|
||||
runs: [{ text: text() }],
|
||||
}}
|
||||
/>
|
||||
<Show
|
||||
when={
|
||||
config()?.romanization &&
|
||||
simplifyUnicode(props.line) !== simplifyUnicode(romanization())
|
||||
simplifyUnicode(text()) !== simplifyUnicode(romanization())
|
||||
}
|
||||
>
|
||||
<yt-formatted-string
|
||||
|
||||
@ -7,7 +7,12 @@ import { type LineLyrics } from '@/plugins/synced-lyrics/types';
|
||||
import { config, currentTime } from '../renderer';
|
||||
import { _ytAPI } from '..';
|
||||
|
||||
import { canonicalize, romanize, simplifyUnicode } from '../utils';
|
||||
import {
|
||||
canonicalize,
|
||||
convertChineseCharacter,
|
||||
romanize,
|
||||
simplifyUnicode,
|
||||
} from '../utils';
|
||||
|
||||
interface SyncedLineProps {
|
||||
scroller: VirtualizerHandle;
|
||||
@ -81,7 +86,14 @@ const EmptyLine = (props: SyncedLineProps) => {
|
||||
};
|
||||
|
||||
export const SyncedLine = (props: SyncedLineProps) => {
|
||||
const text = createMemo(() => props.line.text.trim());
|
||||
const text = createMemo(() => {
|
||||
let line = props.line.text;
|
||||
const convertChineseText = config()?.convertChineseCharacter;
|
||||
if (convertChineseText && convertChineseText !== 'disabled') {
|
||||
line = convertChineseCharacter(line, convertChineseText);
|
||||
}
|
||||
return line.trim();
|
||||
});
|
||||
|
||||
const [romanization, setRomanization] = createSignal('');
|
||||
createEffect(() => {
|
||||
|
||||
@ -3,10 +3,11 @@ import KuromojiAnalyzer from 'kuroshiro-analyzer-kuromoji';
|
||||
import Kuroshiro from 'kuroshiro';
|
||||
import { romanize as esHangulRomanize } from 'es-hangul';
|
||||
import hanja from 'hanja';
|
||||
import * as pinyin from 'tiny-pinyin';
|
||||
import { pinyin } from 'pinyin-pro';
|
||||
import { romanize as romanizeThaiFrag } from '@dehoist/romanize-thai';
|
||||
import { lazy } from 'lazy-var';
|
||||
import { detect } from 'tinyld';
|
||||
import { sify, tify } from 'chinese-conv';
|
||||
import Sanscript from '@indic-transliteration/sanscript';
|
||||
|
||||
import { waitForElement } from '@/utils/wait-for-element';
|
||||
@ -85,6 +86,20 @@ export const canonicalize = (text: string) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const convertChineseCharacter = (
|
||||
text: string,
|
||||
mode: 'simplifiedToTraditional' | 'traditionalToSimplified',
|
||||
) => {
|
||||
if (!hasChinese([text])) return text;
|
||||
|
||||
switch (mode) {
|
||||
case 'simplifiedToTraditional':
|
||||
return tify(text);
|
||||
case 'traditionalToSimplified':
|
||||
return sify(text);
|
||||
}
|
||||
};
|
||||
|
||||
export const simplifyUnicode = (text?: string) =>
|
||||
text
|
||||
? text
|
||||
@ -172,9 +187,9 @@ export const romanizeHangul = (line: string) =>
|
||||
esHangulRomanize(hanja.translate(line, 'SUBSTITUTION'));
|
||||
|
||||
export const romanizeChinese = (line: string) => {
|
||||
return line.replaceAll(/[\u4E00-\u9FFF]+/g, (match) =>
|
||||
pinyin.convertToPinyin(match, ' ', true),
|
||||
);
|
||||
return line.replaceAll(/[\u4E00-\u9FFF]+/g, (match) => {
|
||||
return pinyin(match, { separator: ' ' });
|
||||
});
|
||||
};
|
||||
|
||||
const thaiSegmenter = Intl.Segmenter.supportedLocalesOf('th').includes('th')
|
||||
|
||||
@ -10,6 +10,10 @@ export type SyncedLyricsPluginConfig = {
|
||||
showLyricsEvenIfInexact: boolean;
|
||||
lineEffect: LineEffect;
|
||||
romanization: boolean;
|
||||
convertChineseCharacter?:
|
||||
| 'simplifiedToTraditional'
|
||||
| 'traditionalToSimplified'
|
||||
| 'disabled';
|
||||
};
|
||||
|
||||
export type LineLyricsStatus = 'previous' | 'current' | 'upcoming';
|
||||
|
||||
Reference in New Issue
Block a user