mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-26 09:32:06 +00:00
Compare commits
35 Commits
5f82fd9e5a
...
lrc-parser
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e6f1231a8 | |||
| f9a0fba2d1 | |||
| 5bbf7f964c | |||
| 428151ad6e | |||
| 1d72d1260c | |||
| 20836d9e62 | |||
| fc092177e1 | |||
| b3fe19c136 | |||
| 4231289bbb | |||
| 746e0ba584 | |||
| 803e2b3312 | |||
| 320a166f59 | |||
| c6c8899af8 | |||
| 7a63fc45c7 | |||
| 21533ee461 | |||
| 9e3d3662ce | |||
| 9f56befc3c | |||
| 7b7c4a4153 | |||
| c07f1ef584 | |||
| c506bf21a9 | |||
| 4e697f250a | |||
| 0e80e09313 | |||
| 70bede3f07 | |||
| b37db09e0c | |||
| 7a4def8acc | |||
| f4bbd53e1a | |||
| 272ee7bdb1 | |||
| cece515696 | |||
| 82b7b24ef7 | |||
| 732bbc17f4 | |||
| 29da42d9ff | |||
| 269d0cd638 | |||
| 69e15165e3 | |||
| 7663a12ee4 | |||
| dcda0b3561 |
@ -69,7 +69,7 @@
|
||||
|
||||
You can help with translation on [Hosted Weblate](https://bit.ly/48n5YF7).
|
||||
|
||||
<a href="https://bit.ly/48n5YF7/">
|
||||
<a href="https://bit.ly/48n5YF7">
|
||||
<img src="https://bit.ly/4q83L6S" alt="translation status" />
|
||||
<img src="https://bit.ly/4h3zBxo" alt="translation status 2" />
|
||||
</a>
|
||||
|
||||
44
package.json
44
package.json
@ -45,12 +45,12 @@
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"vite": "npm:rolldown-vite@7.3.0",
|
||||
"node-gyp": "11.4.2",
|
||||
"vite": "npm:rolldown-vite@7.3.1",
|
||||
"node-gyp": "11.5.0",
|
||||
"xml2js": "0.6.2",
|
||||
"node-fetch": "3.3.2",
|
||||
"@electron/universal": "3.0.2",
|
||||
"@babel/runtime": "7.28.4"
|
||||
"@babel/runtime": "7.28.6"
|
||||
},
|
||||
"patchedDependencies": {
|
||||
"vudio@2.1.1": "patches/vudio@2.1.1.patch",
|
||||
@ -70,11 +70,11 @@
|
||||
"@ffmpeg.wasm/main": "0.12.0",
|
||||
"@floating-ui/dom": "1.7.4",
|
||||
"@foobar404/wave": "2.0.5",
|
||||
"@ghostery/adblocker-electron": "2.11.6",
|
||||
"@ghostery/adblocker-electron": "2.13.4",
|
||||
"@ghostery/adblocker-electron-preload": "2.11.6",
|
||||
"@hono/node-server": "1.19.7",
|
||||
"@hono/node-server": "1.19.9",
|
||||
"@hono/node-ws": "1.2.0",
|
||||
"@hono/swagger-ui": "0.5.2",
|
||||
"@hono/swagger-ui": "0.5.3",
|
||||
"@hono/zod-openapi": "1.2.0",
|
||||
"@hono/zod-validator": "0.7.6",
|
||||
"@jellybrick/dbus-next": "0.10.3",
|
||||
@ -106,7 +106,7 @@
|
||||
"filenamify": "6.0.0",
|
||||
"hanja": "1.1.5",
|
||||
"happy-dom": "20.0.11",
|
||||
"hono": "4.10.3",
|
||||
"hono": "4.11.4",
|
||||
"howler": "2.2.4",
|
||||
"html-to-text": "9.0.5",
|
||||
"i18next": "25.5.2",
|
||||
@ -118,7 +118,7 @@
|
||||
"kuroshiro-analyzer-kuromoji": "1.1.0",
|
||||
"lazy-var": "2.2.2",
|
||||
"mdui": "2.1.4",
|
||||
"node-html-parser": "7.0.1",
|
||||
"node-html-parser": "7.0.2",
|
||||
"node-id3": "0.2.9",
|
||||
"peerjs": "1.5.5",
|
||||
"semver": "7.7.3",
|
||||
@ -126,12 +126,12 @@
|
||||
"socks": "2.8.7",
|
||||
"solid-element": "1.9.1",
|
||||
"solid-floating-ui": "0.3.1",
|
||||
"solid-js": "1.9.9",
|
||||
"solid-js": "1.9.10",
|
||||
"solid-styled-components": "0.28.5",
|
||||
"solid-transition-group": "0.3.0",
|
||||
"tiny-pinyin": "1.3.2",
|
||||
"tinyld": "1.3.4",
|
||||
"virtua": "0.48.2",
|
||||
"virtua": "0.48.3",
|
||||
"vudio": "2.1.1",
|
||||
"x11": "2.3.0",
|
||||
"youtubei.js": "^16.0.1",
|
||||
@ -139,44 +139,44 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-toolkit/tsconfig": "1.0.1",
|
||||
"@eslint/js": "9.35.0",
|
||||
"@eslint/js": "9.39.2",
|
||||
"@malept/flatpak-bundler": "0.4.0",
|
||||
"@playwright/test": "1.55.0",
|
||||
"@stylistic/eslint-plugin": "5.3.1",
|
||||
"@playwright/test": "1.57.0",
|
||||
"@stylistic/eslint-plugin": "5.7.0",
|
||||
"@total-typescript/ts-reset": "0.6.1",
|
||||
"@types/electron-localshortcut": "3.1.3",
|
||||
"@types/howler": "2.2.12",
|
||||
"@types/html-to-text": "9.0.4",
|
||||
"@types/semver": "7.7.1",
|
||||
"@types/trusted-types": "2.0.7",
|
||||
"bufferutil": "4.0.9",
|
||||
"bufferutil": "4.1.0",
|
||||
"builtin-modules": "5.0.0",
|
||||
"cross-env": "10.0.0",
|
||||
"cross-env": "10.1.0",
|
||||
"del-cli": "6.0.0",
|
||||
"discord-api-types": "0.38.37",
|
||||
"electron": "38.7.2",
|
||||
"electron-builder": "26.4.0",
|
||||
"electron-builder-squirrel-windows": "26.0.12",
|
||||
"electron-builder-squirrel-windows": "26.4.0",
|
||||
"electron-devtools-installer": "4.0.0",
|
||||
"electron-vite": "4.0.1",
|
||||
"eslint": "9.35.0",
|
||||
"eslint": "9.39.2",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"eslint-import-resolver-exports": "1.0.0-beta.5",
|
||||
"eslint-import-resolver-typescript": "4.4.4",
|
||||
"eslint-plugin-import": "2.32.0",
|
||||
"eslint-plugin-prettier": "5.5.4",
|
||||
"eslint-plugin-prettier": "5.5.5",
|
||||
"eslint-plugin-solid": "0.14.5",
|
||||
"glob": "11.1.0",
|
||||
"node-gyp": "11.4.2",
|
||||
"node-gyp": "11.5.0",
|
||||
"ts-morph": "27.0.2",
|
||||
"typescript": "5.9.3",
|
||||
"typescript-eslint": "8.43.0",
|
||||
"typescript-eslint": "8.53.1",
|
||||
"utf-8-validate": "6.0.6",
|
||||
"vite": "npm:rolldown-vite@7.3.0",
|
||||
"vite": "npm:rolldown-vite@7.3.1",
|
||||
"vite-plugin-inspect": "11.3.3",
|
||||
"vite-plugin-resolve": "2.5.2",
|
||||
"vite-plugin-solid": "2.11.10",
|
||||
"ws": "8.18.3"
|
||||
"ws": "8.19.0"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"hideCredit": true,
|
||||
|
||||
1300
pnpm-lock.yaml
generated
1300
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -321,6 +321,22 @@
|
||||
"hostname": {
|
||||
"label": "Nom del host"
|
||||
},
|
||||
"https": {
|
||||
"label": "HTTPS i Certificats",
|
||||
"submenu": {
|
||||
"cert": {
|
||||
"dialogTitle": "Seleccionar arxiu de certificat HTTPS",
|
||||
"label": "Arxiu de certificat (.crt/.pem)"
|
||||
},
|
||||
"enable-https": {
|
||||
"label": "Activa HTTPS"
|
||||
},
|
||||
"key": {
|
||||
"dialogTitle": "Selecciona arxiu de clau HTTPS privada",
|
||||
"label": "Arxiu de clau privada (.key/.pem)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"port": {
|
||||
"label": "Port"
|
||||
}
|
||||
@ -462,8 +478,8 @@
|
||||
"set-status-display-type": {
|
||||
"label": "Text d'estat",
|
||||
"submenu": {
|
||||
"artist": "Escoltant {artist}",
|
||||
"application": "Escoltant {{applicationName}}",
|
||||
"artist": "Escoltant {artist}",
|
||||
"title": "Escoltant {song title}"
|
||||
}
|
||||
}
|
||||
|
||||
@ -883,12 +883,12 @@
|
||||
},
|
||||
"name": "Synchronisierte Texte",
|
||||
"refetch-btn": {
|
||||
"fetching": "Hole Songtext...",
|
||||
"normal": "Songtext neu holen"
|
||||
"fetching": "Laden...",
|
||||
"normal": "Songtext neu laden"
|
||||
},
|
||||
"warnings": {
|
||||
"duration-mismatch": "⚠️ - Es kann sein, dass die Synchronization nicht stimmt, da die Songdauer nicht übereinstimmt.",
|
||||
"inexact": "⚠️ - Der Songtext stimmt möglicherweise nicht überein",
|
||||
"inexact": "⚠️ - Es ist möglich, dass der Songtext für diesen Song nicht übereinstimmt.",
|
||||
"instrumental": "⚠️ - Das ist ein instrumentales Lied"
|
||||
}
|
||||
},
|
||||
|
||||
@ -128,7 +128,7 @@
|
||||
},
|
||||
"label": "Keel",
|
||||
"submenu": {
|
||||
"to-help-translate": "Soovid aidata tõlkimisel? Klõpsi siin"
|
||||
"to-help-translate": "Soovid aidata tõlkimisel? Klõpsa siin"
|
||||
}
|
||||
},
|
||||
"resume-on-start": "Rakenduse käivitamisel jätka viimatiesitatud loo esitamist",
|
||||
@ -139,7 +139,7 @@
|
||||
"unset": "Määramata"
|
||||
},
|
||||
"tray": {
|
||||
"label": "Trey",
|
||||
"label": "Tasku",
|
||||
"submenu": {
|
||||
"disabled": "Välja lülitatud",
|
||||
"enabled-and-hide-app": "Sisse lülitatud ja rakendus peidetud",
|
||||
@ -227,7 +227,7 @@
|
||||
},
|
||||
"album-actions": {
|
||||
"description": "Lisab Undislike, Ebameeldiv, Meeldiv ja Unlike nupud selle rakendamiseks kõikidele loendisse või albumisse kuuluvatele lauludele.",
|
||||
"name": "Albumi aktsioonid"
|
||||
"name": "Albumi toimingud"
|
||||
},
|
||||
"album-color-theme": {
|
||||
"description": "Rakendab dünaamilist teemat ja visuaalseid efekte, mis põhinevad albumi värvipalettil",
|
||||
@ -237,7 +237,8 @@
|
||||
"submenu": {
|
||||
"percent": "{{suhe}}%"
|
||||
}
|
||||
}
|
||||
},
|
||||
"enable-seekbar": "Luba kerimisriba kujundamine"
|
||||
},
|
||||
"name": "Albumi värviteema"
|
||||
},
|
||||
@ -245,9 +246,19 @@
|
||||
"description": "Rakendab valgusefekti, projitseerides videost õrnad värvid ekraani taustale",
|
||||
"menu": {
|
||||
"blur-amount": {
|
||||
"label": "Hägusus"
|
||||
"label": "Hägusus",
|
||||
"submenu": {
|
||||
"pixels": "{{blurAmount}} pikslit"
|
||||
}
|
||||
},
|
||||
"buffer": {
|
||||
"label": "Puhver",
|
||||
"submenu": {
|
||||
"buffer": "{{buffer}}"
|
||||
}
|
||||
},
|
||||
"opacity": {
|
||||
"label": "Läbipaistmatus",
|
||||
"submenu": {
|
||||
"percent": "{{opacity}}%"
|
||||
}
|
||||
@ -263,8 +274,15 @@
|
||||
"submenu": {
|
||||
"percent": "{{size}}%"
|
||||
}
|
||||
},
|
||||
"smoothness-transition": {
|
||||
"label": "Sujuv üleminek"
|
||||
},
|
||||
"use-fullscreen": {
|
||||
"label": "Kasutamas täisekraani"
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "Ümbritsev režiim"
|
||||
},
|
||||
"blur-nav-bar": {
|
||||
"description": "Muudab navigatsiooniriba läbipaistavaks ja hägusaks",
|
||||
|
||||
@ -237,7 +237,8 @@
|
||||
"submenu": {
|
||||
"percent": "{{ratio}}%"
|
||||
}
|
||||
}
|
||||
},
|
||||
"enable-seekbar": "Abilita tematizzazione della seekbar"
|
||||
},
|
||||
"name": "Tema abbinato a colore album"
|
||||
},
|
||||
@ -320,6 +321,22 @@
|
||||
"hostname": {
|
||||
"label": "Hostname"
|
||||
},
|
||||
"https": {
|
||||
"label": "HTTPS & Certificati",
|
||||
"submenu": {
|
||||
"cert": {
|
||||
"dialogTitle": "Seleziona file di certificato HTTPS",
|
||||
"label": "File di certificato (.crt/.pem)"
|
||||
},
|
||||
"enable-https": {
|
||||
"label": "Abilita HTTPS"
|
||||
},
|
||||
"key": {
|
||||
"dialogTitle": "Seleziona il file della chiave privata HTTPS",
|
||||
"label": "File della chiave privata (.key/.pem)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"port": {
|
||||
"label": "Porta"
|
||||
}
|
||||
@ -461,9 +478,9 @@
|
||||
"set-status-display-type": {
|
||||
"label": "Testo dello status",
|
||||
"submenu": {
|
||||
"application": "Ascoltando {{applicationName}}",
|
||||
"artist": "Stai ascoltando {artist}",
|
||||
"title": "Stai ascoltando {song title}",
|
||||
"application": "Ascoltando {{applicationName}}"
|
||||
"title": "Stai ascoltando {song title}"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -866,7 +883,7 @@
|
||||
},
|
||||
"name": "Testi sincronizzati",
|
||||
"refetch-btn": {
|
||||
"fetching": "Sto recuperando...",
|
||||
"fetching": "Caricamento...",
|
||||
"normal": "Recupera i testi"
|
||||
},
|
||||
"warnings": {
|
||||
|
||||
@ -117,7 +117,7 @@
|
||||
"hide-menu": {
|
||||
"dialog": {
|
||||
"message": "მენიუ შემდეგი გაშვებისას დაიმალება, მის საჩვენებლად გამოიყენეთ [Alt] (ან თუ აპლიკაციის მენიუს იყენებთ, უკან დააწკაპუნეთ [`])",
|
||||
"title": "მენიუს დამალვა ჩართულია"
|
||||
"title": "მენიუს დამალვა ჩაირთო"
|
||||
},
|
||||
"label": "მენიუს დამალვა"
|
||||
},
|
||||
|
||||
@ -171,7 +171,7 @@
|
||||
"remove": "제거"
|
||||
},
|
||||
"remove-theme": "사용자 정의 테마를 제거하시겠습니까?",
|
||||
"remove-theme-message": "사용자 정의 테마를 제거하시겠습니까?"
|
||||
"remove-theme-message": "이 설정을 변경하면 커스텀 테마가 삭제됩니다"
|
||||
},
|
||||
"label": "테마",
|
||||
"submenu": {
|
||||
@ -289,7 +289,7 @@
|
||||
},
|
||||
"amuse": {
|
||||
"description": "6K Labs Amuse의 'now playing' 위젯에 {{applicationName}} 지원 추가",
|
||||
"name": "Amuse",
|
||||
"name": "Amuseio AB",
|
||||
"response": {
|
||||
"query": "Amuse API 서버가 실행 중입니다. GET /query로 노래 정보를 가져오세요."
|
||||
}
|
||||
@ -321,6 +321,22 @@
|
||||
"hostname": {
|
||||
"label": "호스트 명"
|
||||
},
|
||||
"https": {
|
||||
"label": "HTTPS 및 인증서",
|
||||
"submenu": {
|
||||
"cert": {
|
||||
"dialogTitle": "HTTPS 인증서 파일을 선택해 주세요",
|
||||
"label": "인증서 파일(.crt/.pem)"
|
||||
},
|
||||
"enable-https": {
|
||||
"label": "HTTPS 활성화"
|
||||
},
|
||||
"key": {
|
||||
"dialogTitle": "HTTPS 개인 키 파일을 선택해 주세요",
|
||||
"label": "개인 키 파일(.key/.pem)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"port": {
|
||||
"label": "포트"
|
||||
}
|
||||
@ -457,13 +473,13 @@
|
||||
"disconnected": "연결 해제 됨",
|
||||
"hide-duration-left": "남은 재생 시간 숨기기",
|
||||
"hide-github-button": "GitHub 링크 버튼 숨기기",
|
||||
"play-on-application": "유튜브 뮤직에서 재생",
|
||||
"play-on-application": "{{applicationName}} 에서 재생",
|
||||
"set-inactivity-timeout": "비활성 시간 제한 설정",
|
||||
"set-status-display-type": {
|
||||
"label": "상태 텍스트",
|
||||
"submenu": {
|
||||
"artist": "{아티스트} 듣는 중",
|
||||
"application": "{{applicationName}} 듣는 중",
|
||||
"artist": "{아티스트} 듣는 중",
|
||||
"title": "{곡 제목} 듣는 중"
|
||||
}
|
||||
}
|
||||
|
||||
@ -237,7 +237,8 @@
|
||||
"submenu": {
|
||||
"percent": "{{ratio}}%"
|
||||
}
|
||||
}
|
||||
},
|
||||
"enable-seekbar": "Schakel thema's voor de schuifbalk in"
|
||||
},
|
||||
"name": "Albumkleurthema"
|
||||
},
|
||||
@ -320,6 +321,22 @@
|
||||
"hostname": {
|
||||
"label": "Hostnaam"
|
||||
},
|
||||
"https": {
|
||||
"label": "HTTPS & Certificaten",
|
||||
"submenu": {
|
||||
"cert": {
|
||||
"dialogTitle": "Selecteer HTTPS certificaat",
|
||||
"label": "Certificaatbestand (.crt/.pem)"
|
||||
},
|
||||
"enable-https": {
|
||||
"label": "HTTPS aanzetten"
|
||||
},
|
||||
"key": {
|
||||
"dialogTitle": "Selecteer HTTPS privésleutel",
|
||||
"label": "Privésleutelbestand (.key/.pem)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"port": {
|
||||
"label": "Poort"
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@
|
||||
"show": "Pokaż okno",
|
||||
"tooltip": {
|
||||
"default": "{{applicationName}}",
|
||||
"with-song-info": "{{artist}} - (autorstwa {{artist}}) - {{applicationName}}"
|
||||
"with-song-info": "{{title}} (autorstwa {{artist}}) - {{applicationName}}"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -295,7 +295,7 @@
|
||||
}
|
||||
},
|
||||
"api-server": {
|
||||
"description": "Pozwala na kontrolowanie {{applicationName}} poprzez podłączenie specjalnego serwera API",
|
||||
"description": "Steruj odtwarzaczem przez specjalny serwer API",
|
||||
"dialog": {
|
||||
"request": {
|
||||
"buttons": {
|
||||
|
||||
@ -321,6 +321,22 @@
|
||||
"hostname": {
|
||||
"label": "Nome do anfitrião"
|
||||
},
|
||||
"https": {
|
||||
"label": "HTTPS & Certificados",
|
||||
"submenu": {
|
||||
"cert": {
|
||||
"dialogTitle": "Selecione o certificado do HTTPS",
|
||||
"label": "Arquivo de certificado (.crt/.pem)"
|
||||
},
|
||||
"enable-https": {
|
||||
"label": "Habilitar HTTPS"
|
||||
},
|
||||
"key": {
|
||||
"dialogTitle": "Selecione a chave privada do HTTPS",
|
||||
"label": "Arquivo de chave privada (.key/.pem)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"port": {
|
||||
"label": "Porta"
|
||||
}
|
||||
@ -462,8 +478,8 @@
|
||||
"set-status-display-type": {
|
||||
"label": "Texto de status",
|
||||
"submenu": {
|
||||
"artist": "Ouvindo {artist}",
|
||||
"application": "Ouvindo {{applicationName}}",
|
||||
"artist": "Ouvindo {artist}",
|
||||
"title": "Ouvindo {song title}"
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
"common": {
|
||||
"console": {
|
||||
"plugins": {
|
||||
"execute-failed": "Ошибка загрузки плагина {{pluginName}}::{{contextName}}",
|
||||
"execute-failed": "Ошибка при выполнении плагина {{pluginName}}::{{contextName}}",
|
||||
"executed-at-ms": "Плагин {{pluginName}}::{{contextName}} загружен за {{ms}}мс",
|
||||
"initialize-failed": "Ошибка инициализации плагина \"{{pluginName}}\"",
|
||||
"load-all": "Загружаем все плагины",
|
||||
"load-failed": "Ошибка загрузки плагина \"{{pluginName}}\"",
|
||||
"loaded": "Плагин \"{{pluginName}}\" загружен",
|
||||
"unload-failed": "Ошибка выгрузки плагина \"{{pluginName}}\"",
|
||||
"unload-failed": "Ошибка при выгрузке плагина \"{{pluginName}}\"",
|
||||
"unloaded": "Плагин \"{{pluginName}}\" выгружен"
|
||||
}
|
||||
}
|
||||
@ -44,7 +44,7 @@
|
||||
},
|
||||
"dialog": {
|
||||
"hide-menu-enabled": {
|
||||
"detail": "Меню скрыто, 'Alt' чтобы показать его ('Escape' если используете внутреннее меню приложения)",
|
||||
"detail": "Меню скрыто, используйте 'Alt' чтобы показать его ('Escape' если используете внутреннее меню приложения)",
|
||||
"message": "Скрытие меню включено",
|
||||
"title": "Включено скрытие меню"
|
||||
},
|
||||
@ -53,8 +53,8 @@
|
||||
"later": "Позже",
|
||||
"restart-now": "Перезапустить сейчас"
|
||||
},
|
||||
"detail": "Перезапустите приложение для включения плагина {{pluginName}}",
|
||||
"message": "Перезапуск для применения плагина {{pluginName}}",
|
||||
"detail": "Для вступления изменений в силу плагину \"{{pluginName}}\" требуется перезапуск",
|
||||
"message": "Требуется перезапуск плагина \"{{pluginName}}\"",
|
||||
"title": "Нужен перезапуск"
|
||||
},
|
||||
"unresponsive": {
|
||||
@ -100,7 +100,7 @@
|
||||
"disable-hardware-acceleration": "Отключить аппаратное ускорение",
|
||||
"edit-config-json": "Редактировать config.json",
|
||||
"override-user-agent": "Переопределить User-Agent",
|
||||
"restart-on-config-changes": "Перезапускать при изменениях конфига",
|
||||
"restart-on-config-changes": "Перезапускать при изменениях конфигурации",
|
||||
"set-proxy": {
|
||||
"label": "Задать прокси",
|
||||
"prompt": {
|
||||
@ -237,7 +237,8 @@
|
||||
"submenu": {
|
||||
"percent": "{{ratio}}%"
|
||||
}
|
||||
}
|
||||
},
|
||||
"enable-seekbar": "Включить тематическое оформление полосы прокрутки"
|
||||
},
|
||||
"name": "Цветовая тема альбома"
|
||||
},
|
||||
@ -287,7 +288,7 @@
|
||||
"name": "Режим Ambient"
|
||||
},
|
||||
"amuse": {
|
||||
"description": "Добавляет поддержку виджета Amuse „сейчас играет“ от 6K Labs",
|
||||
"description": "Добавляет {{applicationName}} поддержку виджета Amuse „сейчас играет“ от 6K Labs",
|
||||
"name": "Amuse",
|
||||
"response": {
|
||||
"query": "Сервер Amuse API запущен. GET /query чтобы получить информацию о треке."
|
||||
@ -320,6 +321,22 @@
|
||||
"hostname": {
|
||||
"label": "Имя хоста"
|
||||
},
|
||||
"https": {
|
||||
"label": "HTTPS и сертификаты",
|
||||
"submenu": {
|
||||
"cert": {
|
||||
"dialogTitle": "Выберите файл сертификата HTTPS",
|
||||
"label": "Файл сертификата (.crt/.pem)"
|
||||
},
|
||||
"enable-https": {
|
||||
"label": "Включить HTTPS"
|
||||
},
|
||||
"key": {
|
||||
"dialogTitle": "Выберите файл приватного ключа HTTPS",
|
||||
"label": "Файл приватного ключа (.key/.pem)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"port": {
|
||||
"label": "Порт"
|
||||
}
|
||||
|
||||
@ -321,6 +321,22 @@
|
||||
"hostname": {
|
||||
"label": "Ana bilgisayar adı"
|
||||
},
|
||||
"https": {
|
||||
"label": "HTTPS & Sertifikalar",
|
||||
"submenu": {
|
||||
"cert": {
|
||||
"dialogTitle": "HTTPS sertifika dosyası seç",
|
||||
"label": "Sertifika dosyası (.crt/.pem)"
|
||||
},
|
||||
"enable-https": {
|
||||
"label": "HTTPS'i aktifleştir"
|
||||
},
|
||||
"key": {
|
||||
"dialogTitle": "HTTPS özel anahtar dosyası seç",
|
||||
"label": "Özel anahtar dosyası (.key/.pem)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"port": {
|
||||
"label": "Port"
|
||||
}
|
||||
@ -462,8 +478,8 @@
|
||||
"set-status-display-type": {
|
||||
"label": "Durum metni",
|
||||
"submenu": {
|
||||
"artist": "{artist} Dinleniyor",
|
||||
"application": "{{applicationName}} Dinleniyor",
|
||||
"artist": "{artist} Dinleniyor",
|
||||
"title": "{song title} Dinleniyor"
|
||||
}
|
||||
}
|
||||
|
||||
144
src/plugins/synced-lyrics/parsers/lrc.test.ts
Normal file
144
src/plugins/synced-lyrics/parsers/lrc.test.ts
Normal file
@ -0,0 +1,144 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
import { LRC } from './lrc';
|
||||
|
||||
test('empty string', () => {
|
||||
const lrc = LRC.parse('');
|
||||
expect(lrc).toStrictEqual({ lines: [], tags: [] });
|
||||
});
|
||||
|
||||
test('chorus', () => {
|
||||
const lrc = LRC.parse(`\
|
||||
[00:12.00]Line 1 lyrics
|
||||
[00:17.20]Line 2 lyrics
|
||||
[00:21.10][00:45.10]Repeating lyrics (e.g. chorus)
|
||||
[mm:ss.xx]Last lyrics line\
|
||||
`);
|
||||
|
||||
expect(lrc).toStrictEqual({
|
||||
lines: [
|
||||
{ duration: 12000, text: '', words: [], time: '00:00:00', timeInMs: 0 },
|
||||
{
|
||||
duration: 5020,
|
||||
text: 'Line 1 lyrics',
|
||||
words: [],
|
||||
time: '00:12:00',
|
||||
timeInMs: 12000,
|
||||
},
|
||||
{
|
||||
duration: 3990,
|
||||
text: 'Line 2 lyrics',
|
||||
words: [],
|
||||
time: '00:17:20',
|
||||
timeInMs: 17020,
|
||||
},
|
||||
{
|
||||
duration: 24000,
|
||||
text: 'Repeating lyrics (e.g. chorus)',
|
||||
words: [],
|
||||
time: '00:21:10',
|
||||
timeInMs: 21010,
|
||||
},
|
||||
{
|
||||
duration: Infinity,
|
||||
text: 'Repeating lyrics (e.g. chorus)',
|
||||
words: [],
|
||||
time: '00:45:10',
|
||||
timeInMs: 45010,
|
||||
},
|
||||
],
|
||||
tags: [],
|
||||
});
|
||||
});
|
||||
|
||||
test('attributes', () => {
|
||||
const lrc = LRC.parse(
|
||||
`[ar:Chubby Checker oppure Beatles, The]
|
||||
[al:Hits Of The 60's - Vol. 2 – Oldies]
|
||||
[ti:Let's Twist Again]
|
||||
[au:Written by Kal Mann / Dave Appell, 1961]
|
||||
[length: 2:23]
|
||||
|
||||
[00:12.00]Naku Penda Piya-Naku Taka Piya-Mpenziwe
|
||||
[00:15.30]Some more lyrics ...`,
|
||||
);
|
||||
|
||||
expect(lrc).toStrictEqual({
|
||||
lines: [
|
||||
{ duration: 12000, text: '', words: [], time: '00:00:00', timeInMs: 0 },
|
||||
{
|
||||
duration: 3030,
|
||||
text: 'Naku Penda Piya-Naku Taka Piya-Mpenziwe',
|
||||
words: [],
|
||||
time: '00:12:00',
|
||||
timeInMs: 12000,
|
||||
},
|
||||
{
|
||||
duration: Infinity,
|
||||
text: 'Some more lyrics ...',
|
||||
words: [],
|
||||
time: '00:15:30',
|
||||
timeInMs: 15030,
|
||||
},
|
||||
],
|
||||
tags: [
|
||||
{ tag: 'ar', value: 'Chubby Checker oppure Beatles, The' },
|
||||
{ tag: 'al', value: "Hits Of The 60's - Vol. 2 – Oldies" },
|
||||
{ tag: 'ti', value: "Let's Twist Again" },
|
||||
{ tag: 'au', value: 'Written by Kal Mann / Dave Appell, 1961' },
|
||||
{ tag: 'length', value: '2:23' },
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test('karaoke', () => {
|
||||
const lrc = LRC.parse(
|
||||
'[00:00.00] <00:00.04> When <00:00.16> the <00:00.82> truth <00:01.29> is <00:01.63> found <00:03.09> to <00:03.37> be <00:05.92> lies',
|
||||
);
|
||||
|
||||
expect(lrc).toStrictEqual({
|
||||
lines: [
|
||||
{
|
||||
duration: Infinity,
|
||||
text: 'When the truth is found to be lies',
|
||||
time: '00:00:00',
|
||||
timeInMs: 0,
|
||||
words: [
|
||||
{
|
||||
timeInMs: 4,
|
||||
word: 'When',
|
||||
},
|
||||
{
|
||||
timeInMs: 16,
|
||||
word: 'the',
|
||||
},
|
||||
{
|
||||
timeInMs: 82,
|
||||
word: 'truth',
|
||||
},
|
||||
{
|
||||
timeInMs: 1029,
|
||||
word: 'is',
|
||||
},
|
||||
{
|
||||
timeInMs: 1063,
|
||||
word: 'found',
|
||||
},
|
||||
{
|
||||
timeInMs: 3009,
|
||||
word: 'to',
|
||||
},
|
||||
{
|
||||
timeInMs: 3037,
|
||||
word: 'be',
|
||||
},
|
||||
{
|
||||
timeInMs: 5092,
|
||||
word: 'lies',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
tags: [],
|
||||
});
|
||||
});
|
||||
@ -8,6 +8,7 @@ interface LRCLine {
|
||||
timeInMs: number;
|
||||
duration: number;
|
||||
text: string;
|
||||
words: { timeInMs: number; word: string }[];
|
||||
}
|
||||
|
||||
interface LRC {
|
||||
@ -17,7 +18,10 @@ interface LRC {
|
||||
|
||||
const tagRegex = /^\[(?<tag>\w+):\s*(?<value>.+?)\s*\]$/;
|
||||
// prettier-ignore
|
||||
const lyricRegex = /^\[(?<minutes>\d+):(?<seconds>\d+)\.(?<milliseconds>\d+)\](?<text>.+)$/;
|
||||
const timestampRegex = /^\[(?<minutes>\d+):(?<seconds>\d+)\.(?<milliseconds>\d+)\]/m;
|
||||
|
||||
// prettier-ignore
|
||||
const wordRegex = /<(?<minutes>\d+):(?<seconds>\d+)\.(?<milliseconds>\d+)> *(?<word>\w+)/g;
|
||||
|
||||
export const LRC = {
|
||||
parse: (text: string): LRC => {
|
||||
@ -27,13 +31,29 @@ export const LRC = {
|
||||
};
|
||||
|
||||
let offset = 0;
|
||||
let previousLine: LRCLine | null = null;
|
||||
|
||||
for (const line of text.split('\n')) {
|
||||
if (!line.trim().startsWith('[')) continue;
|
||||
for (let line of text.split('\n')) {
|
||||
line = line.trim();
|
||||
if (!line.startsWith('[')) continue;
|
||||
|
||||
const lyric = line.match(lyricRegex)?.groups;
|
||||
if (!lyric) {
|
||||
const timestamps = [];
|
||||
let match: Record<string, string> | undefined;
|
||||
while ((match = line.match(timestampRegex)?.groups)) {
|
||||
const { minutes, seconds, milliseconds } = match;
|
||||
const timeInMs =
|
||||
parseInt(minutes) * 60 * 1000 +
|
||||
parseInt(seconds) * 1000 +
|
||||
parseInt(milliseconds);
|
||||
|
||||
timestamps.push({
|
||||
time: `${minutes}:${seconds}:${milliseconds}`,
|
||||
timeInMs,
|
||||
});
|
||||
|
||||
line = line.replace(timestampRegex, '');
|
||||
}
|
||||
|
||||
if (!timestamps.length) {
|
||||
const tag = line.match(tagRegex)?.groups;
|
||||
if (tag) {
|
||||
if (tag.tag === 'offset') {
|
||||
@ -49,38 +69,52 @@ export const LRC = {
|
||||
continue;
|
||||
}
|
||||
|
||||
const { minutes, seconds, milliseconds, text } = lyric;
|
||||
const timeInMs =
|
||||
parseInt(minutes) * 60 * 1000 +
|
||||
parseInt(seconds) * 1000 +
|
||||
parseInt(milliseconds);
|
||||
let text = line.trim();
|
||||
const words = Array.from(text.matchAll(wordRegex), ({ groups }) => {
|
||||
const { minutes, seconds, milliseconds, word } = groups!;
|
||||
const timeInMs =
|
||||
parseInt(minutes) * 60 * 1000 +
|
||||
parseInt(seconds) * 1000 +
|
||||
parseInt(milliseconds);
|
||||
|
||||
const currentLine: LRCLine = {
|
||||
time: `${minutes}:${seconds}:${milliseconds}`,
|
||||
timeInMs,
|
||||
text: text.trim(),
|
||||
duration: Infinity,
|
||||
};
|
||||
return { timeInMs, word };
|
||||
});
|
||||
|
||||
if (previousLine) {
|
||||
previousLine.duration = timeInMs - previousLine.timeInMs;
|
||||
if (words.length) {
|
||||
text = words.map(({ word }) => word).join(' ');
|
||||
}
|
||||
|
||||
previousLine = currentLine;
|
||||
lrc.lines.push(currentLine);
|
||||
for (const { time, timeInMs } of timestamps) {
|
||||
lrc.lines.push({
|
||||
time,
|
||||
timeInMs,
|
||||
text,
|
||||
words,
|
||||
duration: Infinity,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
for (const line of lrc.lines) {
|
||||
line.timeInMs += offset;
|
||||
lrc.lines.sort(({ timeInMs: timeA }, { timeInMs: timeB }) => timeA - timeB);
|
||||
for (let i = 0; i < lrc.lines.length; i++) {
|
||||
const current = lrc.lines[i];
|
||||
const next = lrc.lines[i + 1];
|
||||
|
||||
current.timeInMs += offset;
|
||||
|
||||
if (next) {
|
||||
current.duration = next.timeInMs - current.timeInMs;
|
||||
}
|
||||
}
|
||||
|
||||
const first = lrc.lines.at(0);
|
||||
if (first && first.timeInMs > 300) {
|
||||
lrc.lines.unshift({
|
||||
time: '0:0:0',
|
||||
time: '00:00:00',
|
||||
timeInMs: 0,
|
||||
duration: first.timeInMs,
|
||||
text: '',
|
||||
words: [],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user