From 59bb1d9124560f98f0d1d349d489bcd4ec34fb68 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Sat, 2 Dec 2023 10:06:55 +0900 Subject: [PATCH] feat(README): add i18n README - resolves https://github.com/th-ch/youtube-music/discussions/719 --- readme.md => README.md | 6 +- docs/readme/README-ko.md | 327 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 331 insertions(+), 2 deletions(-) rename readme.md => README.md (98%) create mode 100644 docs/readme/README-ko.md diff --git a/readme.md b/README.md similarity index 98% rename from readme.md rename to README.md index 20ff6d5b..2c82dda2 100644 --- a/readme.md +++ b/README.md @@ -20,6 +20,8 @@ +Read this in other languages: [๐Ÿ‡ฐ๐Ÿ‡ท](./docs/readme/README-ko.md) + **Electron wrapper around YouTube Music featuring:** - Native look & feel, aims at keeping the original interface @@ -253,7 +255,7 @@ export default createPlugin({ }, // it fired when config changed onConfigChange(newConfig) { /* ... */ }, - // you can also clean up plugin + // it fired when plugin disabled stop(context) { /* ... */ }, }, renderer: { @@ -317,7 +319,7 @@ const builder = createPlugin({ }); ``` -- communicating between the front and back: can be done using the ipcMain module from electron. See `utils.js` file and +- communicating between the front and back: can be done using the ipcMain module from electron. See `index.ts` file and example in `sponsorblock` plugin. ## Build diff --git a/docs/readme/README-ko.md b/docs/readme/README-ko.md new file mode 100644 index 00000000..1d921e37 --- /dev/null +++ b/docs/readme/README-ko.md @@ -0,0 +1,327 @@ +# ์œ ํŠœ๋ธŒ ๋ฎค์ง (YouTube Music) + +
+ +[![GitHub release](https://img.shields.io/github/release/th-ch/youtube-music.svg?style=for-the-badge&logo=youtube-music)](https://github.com/th-ch/youtube-music/releases/) +[![GitHub license](https://img.shields.io/github/license/th-ch/youtube-music.svg?style=for-the-badge)](https://github.com/th-ch/youtube-music/blob/master/LICENSE) +[![eslint code style](https://img.shields.io/badge/code_style-eslint-5ed9c7.svg?style=for-the-badge)](https://github.com/th-ch/youtube-music/blob/master/.eslintrc.js) +[![Build status](https://img.shields.io/github/actions/workflow/status/th-ch/youtube-music/build.yml?branch=master&style=for-the-badge&logo=youtube-music)](https://GitHub.com/th-ch/youtube-music/releases/) +[![GitHub All Releases](https://img.shields.io/github/downloads/th-ch/youtube-music/total?style=for-the-badge&logo=youtube-music)](https://GitHub.com/th-ch/youtube-music/releases/) +[![AUR](https://img.shields.io/aur/version/youtube-music-bin?color=blueviolet&style=for-the-badge&logo=youtube-music)](https://aur.archlinux.org/packages/youtube-music-bin) +[![Known Vulnerabilities](https://snyk.io/test/github/th-ch/youtube-music/badge.svg)](https://snyk.io/test/github/th-ch/youtube-music) + +
+ +![Screenshot](../../web/screenshot.jpg "Screenshot") + +
+ + YouTube Music SVG + +
+ +**์œ ํŠœ๋ธŒ ๋ฎค์ง์˜ Electron ๋ž˜ํผ; ๊ธฐ๋Šฅ:** + +- ์›๋ž˜์˜ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์œ ์ง€ํ•˜๋Š” ๊ฒƒ์„ ๋ชฉํ‘œ๋กœ ํ•˜๋Š” ๋„ค์ดํ‹ฐ๋ธŒ ๋””์ž์ธ ๋ฐ ๋А๋‚Œ +- ๋งž์ถค ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์œ„ํ•œ ํ”„๋ ˆ์ž„์›Œํฌ: ์Šคํƒ€์ผ, ์ฝ˜ํ…์ธ , ๊ธฐ๋Šฅ ๋“ฑ ํ•„์š”์— ๋”ฐ๋ผ ์œ ํŠœ๋ธŒ ๋ฎค์ง์„ ๋ณ€๊ฒฝํ•˜๊ณ , ํด๋ฆญ ํ•œ ๋ฒˆ์œผ๋กœ ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ํ™œ์„ฑํ™”/๋น„ํ™œ์„ฑํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. + +## ๋ฒˆ์—ญ + +[Hosted Weblate](https://hosted.weblate.org/projects/youtube-music/)์—์„œ ๋ฒˆ์—ญ์„ ๋„์šธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. + + + ๋ฒˆ์—ญ ์ƒํƒœ + ๋ฒˆ์—ญ ์ƒํƒœ 2 + + +## ๋‹ค์šด๋กœ๋“œ + +[์ตœ์‹  ๋ฆด๋ฆฌ์ฆˆ](https://github.com/th-ch/youtube-music/releases/latest)๋ฅผ ํ™•์ธํ•˜์—ฌ ์ตœ์‹  ๋ฒ„์ „์„ ๋น ๋ฅด๊ฒŒ ์ฐพ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. + +### Arch Linux + +AUR์—์„œ `youtube-music-bin` ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. AUR ์„ค์น˜ ์ง€์นจ์€ [์ด ์œ„ํ‚ค ํŽ˜์ด์ง€](https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages)๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”. + +### MacOS + +Homebrew๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์•ฑ์„ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: +```bash +brew install --cask https://raw.githubusercontent.com/th-ch/youtube-music/master/youtube-music.rb +``` + +(์•ฑ์„ ์ˆ˜๋™์œผ๋กœ ์„ค์น˜ํ•˜๊ณ ) ์•ฑ์„ ์‹คํ–‰ํ•  ๋•Œ `์†์ƒ๋˜์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ์—ด ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.`๋ผ๋Š” ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด ํ„ฐ๋ฏธ๋„์—์„œ ๋‹ค์Œ์„ ์‹คํ–‰ํ•˜์„ธ์š”: + +```bash +xattr -cr /Applications/YouTube\ Music.app +``` + +### Windows + +[Scoop ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €](https://scoop.sh)๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ [`extras` ๋ฒ„ํ‚ท](https://github.com/ScoopInstaller/Extras)์—์„œ `youtube-music` ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. + +```bash +scoop bucket add extras +scoop install extras/youtube-music +``` + +๋˜๋Š” Windows 11์˜ ๊ณต์‹ CLI ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ์ž์ธ [Winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/)์„ ์‚ฌ์šฉํ•˜์—ฌ `th-ch.YouTubeMusic` ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. + +*์ฐธ๊ณ : "์•Œ ์ˆ˜ ์—†๋Š” ๊ฒŒ์‹œ์ž"์˜ ํŒŒ์ผ์ด๊ธฐ ๋•Œ๋ฌธ์— Microsoft Defender์˜ SmartScreen์—์„œ ์„ค์น˜๋ฅผ ์ฐจ๋‹จํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Š” GitHub์—์„œ ๋™์ผ ํŒŒ์ผ์„ ์ˆ˜๋™์œผ๋กœ ๋‹ค์šด๋กœ๋“œํ•œ ํ›„ ์‹คํ–‰ ํŒŒ์ผ(.exe)์„ ์‹คํ–‰ํ•˜๋ ค๊ณ  ํ•  ๋•Œ๋„ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.* + +```bash +winget install th-ch.YouTubeMusic +``` + +#### (Windows์—์„œ) ๋„คํŠธ์›Œํฌ์— ์—ฐ๊ฒฐํ•˜์ง€ ์•Š๊ณ  ์„ค์น˜ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ๋ฌด์—‡์ธ๊ฐ€์š”? + +- [๋ฆด๋ฆฌ์ฆˆ ํŽ˜์ด์ง€](https://github.com/th-ch/youtube-music/releases/latest)์—์„œ _๋ณธ์ธ ๊ธฐ๊ธฐ ์•„ํ‚คํ…์ฒ˜_์— ๋งž๋Š” `*.nsis.7z` ํŒŒ์ผ์„ ๋‹ค์šด๋กœ๋“œํ•˜์„ธ์š”. + - `x64`๋Š” 64๋น„ํŠธ Windows ์šฉ์ž…๋‹ˆ๋‹ค. + - `ia32`๋Š” 32๋น„ํŠธ Windows ์šฉ์ž…๋‹ˆ๋‹ค. + - `arm64`๋Š” ARM64 Windows ์šฉ์ž…๋‹ˆ๋‹ค. +- ๋ฆด๋ฆฌ์ฆˆ ํŽ˜์ด์ง€์—์„œ ์„ค์น˜๊ธฐ๋ฅผ ๋‹ค์šด๋กœ๋“œํ•˜์„ธ์š”. (`*-Setup.exe`) +- ๋‘ ํŒŒ์ผ์„ **๋™์ผํ•œ ์œ„์น˜**์— ๋†“์•„์ฃผ์„ธ์š”. +- ์„ค์น˜๊ธฐ๋ฅผ ์‹คํ–‰ํ•˜์„ธ์š”. + +## ๊ธฐ๋Šฅ: + +- **์ผ์‹œ ์ •์ง€ ์‹œ ์ž๋™ ํ™•์ธ** (ํ•ญ์ƒ ํ™œ์„ฑํ™” ๋จ): ์ผ์ • ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ์Œ์•…์„ ์ผ์‹œ ์ •์ง€ํ•˜๋Š” ["๊ณ„์† ์‹œ์ฒญํ•˜์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ?"](https://user-images.githubusercontent.com/61631665/129977894-01c60740-7ec6-4bf0-9a2c-25da24491b0e.png) ํŒ์—…์„ ๋น„ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค. + +- ์ด์™ธ์— ๋” ๋งŽ์€ ๊ธฐ๋Šฅ ... + +## ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ํ”Œ๋Ÿฌ๊ทธ์ธ: + +- **์• ๋“œ๋ธ”๋ก**: ๋ชจ๋“  ๊ด‘๊ณ ์™€ ํŠธ๋ž˜์ปค๋ฅผ ์ฆ‰์‹œ ์ฐจ๋‹จํ•ฉ๋‹ˆ๋‹ค + +- **์•จ๋ฒ” ์ปฌ๋Ÿฌ ๊ธฐ๋ฐ˜ ํ…Œ๋งˆ**: ์•จ๋ฒ” ์ƒ‰์ƒ ํŒ”๋ ˆํŠธ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๋™์  ํ…Œ๋งˆ ๋ฐ ์‹œ๊ฐ ํšจ๊ณผ๋ฅผ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค + +- **์•ฐ๋น„์–ธํŠธ ๋ชจ๋“œ**: ์˜์ƒ์˜ ๊ฐ„์ ‘ ์กฐ๋ช…์„ ํ™”๋ฉด ๋ฐฐ๊ฒฝ์— ํˆฌ์‚ฌํ•ฉ๋‹ˆ๋‹ค. + +- **์˜ค๋””์˜ค ์ปดํ”„๋ ˆ์„œ**: ์˜ค๋””์˜ค์— ์ปดํ”„๋ ˆ์„œ๋ฅผ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค (์‹ ํ˜ธ์—์„œ ๊ฐ€์žฅ ์‹œ๋„๋Ÿฌ์šด ๋ถ€๋ถ„์˜ ์Œ๋Ÿ‰์„ ๋‚ฎ์ถ”๊ณ  ๊ฐ€์žฅ ์กฐ์šฉํ•œ ๋ถ€๋ถ„์˜ ์Œ๋Ÿ‰์„ ๋†’์ž„) + +- **๋„ค๋น„๊ฒŒ์ด์…˜ ๋ฐ” ํ๋ฆผ ํšจ๊ณผ**: ๋‚ด๋น„๊ฒŒ์ด์…˜ ๋ฐ”๋ฅผ ํˆฌ๋ช…ํ•˜๊ณ  ํ๋ฆฟํ•˜๊ฒŒ ๋งŒ๋“ญ๋‹ˆ๋‹ค + +- **๋‚˜์ด ์ œํ•œ ์šฐํšŒ**: ์œ ํŠœ๋ธŒ์˜ ๋‚˜์ด ์ œํ•œ์„ ์šฐํšŒํ•ฉ๋‹ˆ๋‹ค + +- **์ž๋ง‰ ์„ ํƒ๊ธฐ**: ์ž๋ง‰์„ ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค + +- **์ปดํŒฉํŠธ ์‚ฌ์ด๋“œ๋ฐ”**: ์‚ฌ์ด๋“œ๋ฐ”๋ฅผ ํ•ญ์ƒ ์ปดํŒฉํŠธ ๋ชจ๋“œ๋กœ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค + +- **ํฌ๋กœ์ŠคํŽ˜์ด๋“œ**: ๋…ธ๋ž˜ ์‚ฌ์ด์— ํฌ๋กœ์ŠคํŽ˜์ด๋“œ ํšจ๊ณผ๋ฅผ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค + +- **์ž๋™ ์žฌ์ƒ ํ•ด์ œ**: ๋…ธ๋ž˜๋ฅผ '์ผ์‹œ ์ •์ง€' ๋ชจ๋“œ๋กœ ์‹œ์ž‘ํ•˜๊ฒŒ ํ•ฉ๋‹ˆ๋‹ค + +- [**๋””์Šค์ฝ”๋“œ ํ™œ๋™ ์ƒํƒœ**](https://discord.com/): [ํ™œ๋™ ์ƒํƒœ (Rich Presence)](https://user-images.githubusercontent.com/28219076/104362104-a7a0b980-5513-11eb-9744-bb89eabe0016.png)๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์นœ๊ตฌ๋“ค์—๊ฒŒ ๋‚ด๊ฐ€ ๋“ฃ๋Š” ์Œ์•…์„ ๋ณด์—ฌ์ฃผ์„ธ์š” + +- **๋‹ค์šด๋กœ๋”**: UI์—์„œ [์ง์ ‘](https://user-images.githubusercontent.com/61631665/129977677-83a7d067-c192-45e1-98ae-b5a4927393be.png) MP3/์†Œ์Šค ์˜ค๋””์˜ค๋ฅผ ๋‹ค์šด๋กœ๋“œํ•˜์„ธ์š” + +- **์ง€์ˆ˜ ๋ณผ๋ฅจ**: ์Œ๋Ÿ‰ ์Šฌ๋ผ์ด๋”๋ฅผ [์ง€์ˆ˜์ ](https://greasyfork.org/en/scripts/397686-youtube-music-fix-volume-ratio/)์œผ๋กœ ๋งŒ๋“ค์–ด ๋” ๋‚ฎ์€ ์Œ๋Ÿ‰์„ ์‰ฝ๊ฒŒ ์„ ํƒํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ฉ๋‹ˆ๋‹ค. + +- **์ธ์•ฑ ๋ฉ”๋‰ด**: [๋ฉ”๋‰ด ํ‘œ์‹œ์ค„์„ ๋” ๋ฉ‹์ง€๊ฒŒ, ๊ทธ๋ฆฌ๊ณ  ๋‹คํฌ ๋˜๋Š” ์•จ๋ฒ”์˜ ์ƒ‰์ƒ์œผ๋กœ ๋งŒ๋“ญ๋‹ˆ๋‹ค](https://user-images.githubusercontent.com/78568641/112215894-923dbf00-8c29-11eb-95c3-3ce15db27eca.png) + + > (์ด ํ”Œ๋Ÿฌ๊ทธ์ธ ๋ฐ ๋ฉ”๋‰ด ์ˆจ๊ธฐ๊ธฐ ์˜ต์…˜์„ ํ™œ์„ฑํ™”ํ•œ ํ›„ ๋ฉ”๋‰ด์— ์•ก์„ธ์Šคํ•˜๋Š” ๋ฐ ๋ฌธ์ œ๊ฐ€ ์žˆ๋Š” ๊ฒฝ์šฐ [์ด ๊ธ€](https://github.com/th-ch/youtube-music/issues/410#issuecomment-952060709)์„ ์ฐธ์กฐํ•˜์„ธ์š”) + +- [**Last.fm**](https://www.last.fm/): Last.fm์— ๋Œ€ํ•œ ์Šคํฌ๋Ÿฌ๋ธ” ์ง€์›์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค + +- **Lumia Stream**: [Lumia Stream](https://lumiastream.com/) ์ง€์›์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค + +- **Genius ๊ฐ€์‚ฌ**: ๋” ๋งŽ์€ ๊ณก์— ๋Œ€ํ•ด ๊ฐ€์‚ฌ ์ง€์›์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค + +- **๋„ค๋น„๊ฒŒ์ด์…˜**: ๋ธŒ๋ผ์šฐ์ €์—์„œ์ฒ˜๋Ÿผ, UI์— ์ง์ ‘ ํ†ตํ•ฉ๋œ ์•ž์œผ๋กœ/๋’ค๋กœ ํƒ์ƒ‰ํ•˜๋Š” ํ™”์‚ดํ‘œ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค + +- **Google ๋กœ๊ทธ์ธ ์ œ๊ฑฐ**: UI์—์„œ Google ๋กœ๊ทธ์ธ ๋ฒ„ํŠผ ๋ฐ ๋งํฌ ์ œ๊ฑฐํ•˜๊ธฐ + +- **์•Œ๋ฆผ**: ๋…ธ๋ž˜ ์žฌ์ƒ์ด ์‹œ์ž‘๋˜๋ฉด ์•Œ๋ฆผ์„ ํ‘œ์‹œ (Windows์—์„œ๋Š” [๋Œ€ํ™”ํ˜• ์•Œ๋ฆผ](https://user-images.githubusercontent.com/78568641/114102651-63ce0e00-98d0-11eb-9dfe-c5a02bb54f9c.png) ์‚ฌ์šฉ ๊ฐ€๋Šฅ) + +- **PiP**: ์•ฑ์„ PiP ๋ชจ๋“œ๋กœ ์ „ํ™˜ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ—ˆ์šฉํ•ฉ๋‹ˆ๋‹ค + +- **์žฌ์ƒ ์†๋„**: ๋นจ๋ฆฌ ๋“ฃ๊ฑฐ๋‚˜, ์ฒœ์ฒœํžˆ ๋“ค์–ด๋ณด์„ธ์š”! [๋…ธ๋ž˜ ์†๋„๋ฅผ ์ œ์–ดํ•˜๋Š” ์Šฌ๋ผ์ด๋”๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค](https://user-images.githubusercontent.com/61631665/129976003-e55db5ba-bf42-448c-a059-26a009775e68.png) + +- **์ •ํ™•ํ•œ ์Œ๋Ÿ‰**: ์‚ฌ์šฉ์ž ์ง€์ • HUD์™€ ์‚ฌ์šฉ์ž ์ง€์ • ์Œ๋Ÿ‰ ๋‹จ๊ณ„ ๋ฐ ๋งˆ์šฐ์Šค ํœ /๋‹จ์ถ•ํ‚ค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์Œ๋Ÿ‰์„ ์ •ํ™•ํ•˜๊ฒŒ ์ œ์–ดํ•˜์„ธ์š” + +- **์˜์ƒ ํ’ˆ์งˆ ์ฒด์ธ์ €**: ์˜์ƒ ์˜ค๋ฒ„๋ ˆ์ด์˜ [๋ฒ„ํŠผ](https://user-images.githubusercontent.com/78568641/138574366-70324a5e-2d64-4f6a-acdd-dc2a2b9cecc5.png)์œผ๋กœ ์˜์ƒ ํ’ˆ์งˆ์„ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ฉ๋‹ˆ๋‹ค + +- **๋‹จ์ถ•ํ‚ค (& MPRIS)**: ์žฌ์ƒ์„ ์œ„ํ•œ ์ „์—ญ ๋‹จ์ถ•ํ‚ค ์„ค์ • ํ—ˆ์šฉ (์žฌ์ƒ/์ผ์‹œ ์ •์ง€/๋‹ค์Œ/์ด์ „) + ๋ฏธ๋””์–ด ํ‚ค๋ฅผ ์žฌ์ •์˜ํ•˜์—ฌ [๋ฏธ๋””์–ด osd](https://user-images.githubusercontent.com/84923831/128601225-afa38c1f-dea8-4209-9f72-0f84c1dd8b54.png) ๋น„ํ™œ์„ฑํ™” + Ctrl/CMD + F ๊ฒ€์ƒ‰ ํ™œ์„ฑํ™” + ๋ฏธ๋””์–ด ํ‚ค์— ๋Œ€ํ•œ ๋ฆฌ๋ˆ…์Šค MPRIS ์ง€์› ํ™œ์„ฑํ™” + [๊ณ ๊ธ‰ ์‚ฌ์šฉ์ž](https://github.com/th-ch/youtube-music/issues/106#issuecomment-952156902)๋ฅผ ์œ„ํ•œ [์‚ฌ์šฉ์ž ์ง€์ • ๋‹จ์ถ•ํ‚ค](https://github.com/Araxeus/youtube-music/blob/1e591d6a3df98449bcda6e63baab249b28026148/providers/song-controls.js#L13-L50) ์ง€์› + +- **๋ฌด์Œ ๊ฑด๋„ˆ๋›ฐ๊ธฐ** - ๋…ธ๋ž˜์˜ ๋ฌด์Œ ๋ถ€๋ถ„์„ ์ž๋™์œผ๋กœ ๊ฑด๋„ˆ๋œ๋‹ˆ๋‹ค + +- [**SponsorBlock**](https://github.com/ajayyy/SponsorBlock): ์ธํŠธ๋กœ/์•„์›ƒํŠธ๋กœ์™€ ๊ฐ™์€ ์Œ์•…์ด ์•„๋‹Œ ๋ถ€๋ถ„์ด๋‚˜, ๋…ธ๋ž˜๊ฐ€ ์žฌ์ƒ๋˜์ง€ ์•Š๋Š” ๋ฎค์ง ๋น„๋””์˜ค์˜ ์ผ๋ถ€๋ฅผ ์ž๋™์œผ๋กœ ๊ฑด๋„ˆ๋œ๋‹ˆ๋‹ค + +- **์ž‘์—…ํ‘œ์‹œ์ค„ ๋ฏธ๋””์–ด ์ปจํŠธ๋กค**: [Windows ์ž‘์—…ํ‘œ์‹œ์ค„](https://user-images.githubusercontent.com/78568641/111916130-24a35e80-8a82-11eb-80c8-5021c1aa27f4.png)์—์„œ ์žฌ์ƒ์„ ์ œ์–ดํ•˜์„ธ์š” + +- **TouchBar**: macOS ์‚ฌ์šฉ์ž๋ฅผ ์œ„ํ•œ TouchBar ์œ„์ ฏ์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค + +- **Tuna-OBS**: [OBS](https://obsproject.com/)์˜ ํ”Œ๋Ÿฌ๊ทธ์ธ, [Tuna](https://obsproject.com/forum/resources/tuna.843/)์™€ ํ†ตํ•ฉ์„ ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค + +- **์˜์ƒ ์ „ํ™˜**: ์˜์ƒ/๋…ธ๋ž˜ ๋ชจ๋“œ๋ฅผ ์ „ํ™˜ํ•˜๋Š” [๋ฒ„ํŠผ](https://user-images.githubusercontent.com/28893833/173663950-63e6610e-a532-49b7-9afa-54cb57ddfc15.png)์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค. ์„ ํƒ์ ์œผ๋กœ ์ „์ฒด ์˜์ƒ ํƒญ์„ ์ œ๊ฑฐํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค + +- **๋น„์ฃผ์–ผ๋ผ์ด์ €**: ํ”Œ๋ ˆ์ด์–ด์— ์‹œ๊ฐํ™” ๋„๊ตฌ ์ถ”๊ฐ€ + +## ํ…Œ๋งˆ + +CSS ํŒŒ์ผ์„ ๋กœ๋“œํ•˜์—ฌ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ๋ชจ์–‘์„ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค(์„ค์ • > ์‹œ๊ฐ์  ๋ณ€๊ฒฝ > ํ…Œ๋งˆ). + +์ผ๋ถ€ ์‚ฌ์ „ ์ •์˜ ํ…Œ๋งˆ๋Š” https://github.com/kerichdev/themes-for-ytmdesktop-player ์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. + +## ๊ฐœ๋ฐœ + +```bash +git clone https://github.com/th-ch/youtube-music +cd youtube-music +pnpm install --frozen-lockfile +pnpm dev +``` + +## ๋‚˜๋งŒ์˜ ํ”Œ๋Ÿฌ๊ทธ์ธ ๋งŒ๋“ค๊ธฐ + +ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์‚ฌ์šฉํ•˜๋ฉด ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒƒ๋“ค: + +- ์•ฑ ์กฐ์ž‘ - Electron์—์„œ `BrowserWindow`๊ฐ€ ํ”Œ๋Ÿฌ๊ทธ์ธ ํ•ธ๋“ค๋Ÿฌ๋กœ ์ „๋‹ฌ +- HTML/CSS๋ฅผ ์กฐ์ž‘ํ•˜์—ฌ ํ”„๋ก ํŠธ์—”๋“œ๋ฅผ ๋ณ€๊ฒฝ + +### ํ”Œ๋Ÿฌ๊ทธ์ธ ๋งŒ๋“ค๊ธฐ + +`plugins/๋‚˜๋งŒ์˜-ํ”Œ๋Ÿฌ๊ทธ์ธ-์ด๋ฆ„`์— ํด๋”๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค: + +- `index.ts`: ํ”Œ๋Ÿฌ๊ทธ์ธ์˜ ๋ฉ”์ธ ํŒŒ์ผ์ž…๋‹ˆ๋‹ค. +```typescript +import style from './style.css?inline'; // ์Šคํƒ€์ผ์„ ์ธ๋ผ์ธ์œผ๋กœ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค + +import { createPlugin } from '@/utils'; + +export default createPlugin({ + name: 'Plugin Label', + restartNeeded: true, // ๊ฐ’์ด true๋ฉด, YTM์€ ์žฌ์‹œ์ž‘ ๋‹ค์ด์–ผ๋กœ๊ทธ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค + config: { + enabled: false, + }, // ๋‚˜์˜ ์ปค์Šคํ…€ config + stylesheets: [style], // ๋‚˜์˜ ์Šคํƒ€์ผ + menu: async ({ getConfig, setConfig }) => { + // ๋ชจ๋“  *Config ๋ฉ”์„œ๋“œ๋Š” Promise๋กœ ๋ž˜ํ•‘๋ฉ๋‹ˆ๋‹ค + const config = await getConfig(); + return [ + { + label: 'menu', + submenu: [1, 2, 3].map((value) => ({ + label: `value ${value}`, + type: 'radio', + checked: config.value === value, + click() { + setConfig({ value }); + }, + })), + }, + ]; + }, + backend: { + start({ window, ipc }) { + window.maximize(); + + // ์ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ Œ๋”๋Ÿฌ ํ”Œ๋Ÿฌ๊ทธ์ธ๊ณผ ํ†ต์‹ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค + ipc.handle('some-event', () => { + return 'hello'; + }); + }, + // config๊ฐ€ ๋ณ€๊ฒฝ๋˜๋ฉด ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค + onConfigChange(newConfig) { /* ... */ }, + // ํ”Œ๋Ÿฌ๊ทธ์ธ์ด ๋น„ํ™œ์„ฑํ™”๋˜๋ฉด ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค + stop(context) { /* ... */ }, + }, + renderer: { + async start(context) { + console.log(await context.ipc.invoke('some-event')); + }, + // ๋ Œ๋”๋Ÿฌ์—์„œ๋งŒ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ํ›…์ž…๋‹ˆ๋‹ค + onPlayerApiReady(api: YoutubePlayer, context: RendererContext) { + // ํ”Œ๋Ÿฌ๊ทธ์ธ์˜ config๋ฅผ ๊ฐ„๋‹จํ•˜๊ฒŒ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค + context.setConfig({ myConfig: api.getVolume() }); + }, + onConfigChange(newConfig) { /* ... */ }, + stop(_context) { /* ... */ }, + }, + preload: { + async start({ getConfig }) { + const config = await getConfig(); + }, + onConfigChange(newConfig) {}, + stop(_context) {}, + }, +}); +``` + +### ์ผ๋ฐ˜์ ์ธ ์‚ฌ์šฉ ์˜ˆ + +- ์‚ฌ์šฉ์ž ์ •์˜ CSS ์‚ฝ์ž…: ๊ฐ™์€ ํด๋”์— `style.css` ํŒŒ์ผ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค: + +```typescript +// index.ts +import style from './style.css?inline'; // ์Šคํƒ€์ผ์„ ์ธ๋ผ์ธ์œผ๋กœ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค + +import { createPlugin } from '@/utils'; + +const builder = createPlugin({ + name: 'Plugin Label', + restartNeeded: true, // ๊ฐ’์ด true๋ฉด, YTM์€ ์žฌ์‹œ์ž‘ ๋‹ค์ด์–ผ๋กœ๊ทธ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค + config: { + enabled: false, + }, // ๋‚˜์˜ ์ปค์Šคํ…€ config + stylesheets: [style], // ๋‚˜์˜ ์ปค์Šคํ…€ ์Šคํƒ€์ผ + renderer() {} // ๋ Œ๋”๋Ÿฌ ํ›… ์ •์˜ +}); +``` + +- HTML์„ ๋ณ€๊ฒฝํ•˜๋ ค๋Š” ๊ฒฝ์šฐ: + +```typescript +import { createPlugin } from '@/utils'; + +const builder = createPlugin({ + name: 'Plugin Label', + restartNeeded: true, // ๊ฐ’์ด true๋ฉด, YTM์€ ์žฌ์‹œ์ž‘ ๋‹ค์ด์–ผ๋กœ๊ทธ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค + config: { + enabled: false, + }, // ๋‚˜์˜ ์ปค์Šคํ…€ config + renderer() { + // ๋กœ๊ทธ์ธ ๋ฒ„ํŠผ์„ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค + document.querySelector(".sign-in-link.ytmusic-nav-bar").remove(); + } // ๋ Œ๋”๋Ÿฌ ํ›… ์ •์˜ +}); +``` + +- ํ”„๋ก ํŠธ์—”๋“œ์™€ ๋ฐฑ์—”๋“œ ๊ฐ„์˜ ํ†ต์‹ : Electron์˜ `ipcMain` ๋ชจ๋“ˆ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. `SponsorBlock` ํ”Œ๋Ÿฌ๊ทธ์ธ์˜ `index.ts` ํŒŒ์ผ๊ณผ ์˜ˆ์ œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”. + +## ๋นŒ๋“œ + +1. ๋ ˆํฌ์ง€ํ† ๋ฆฌ๋ฅผ ๋ณต์ œ (clone) ํ•ฉ๋‹ˆ๋‹ค +2. [์ด ๊ฐ€์ด๋“œ](https://pnpm.io/installation)์— ๋”ฐ๋ผ `pnpm`์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. +3. `pnpm install --frozen-lockfile`์„ ์‹คํ–‰ํ•˜์—ฌ ์ข…์†์„ฑ์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. +4. `pnpm build:OS`์„ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค. + +- `pnpm dist:win` - Windows +- `pnpm dist:linux` - Linux +- `pnpm dist:mac` - MacOS + +[electron-builder](https://github.com/electron-userland/electron-builder)๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ macOS, Linux ๋ฐ Windows์šฉ ์•ฑ์„ ๋นŒ๋“œํ•ฉ๋‹ˆ๋‹ค. + +## ํ”„๋กœ๋•์…˜ ๋นŒ๋“œ ๋ฏธ๋ฆฌ๋ณด๊ธฐ + +```bash +pnpm start +``` + +## ํ…Œ์ŠคํŠธ + +```bash +pnpm test +``` + +[Playwright](https://playwright.dev/)๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์•ฑ์„ ํ…Œ์ŠคํŠธํ•ฉ๋‹ˆ๋‹ค. + +## ๋ผ์ด์„ ์Šค + +MIT ยฉ [th-ch](https://github.com/th-ch/youtube-music) + +## ์ž์ฃผ ๋ฌป๋Š” ์งˆ๋ฌธ + +### ์•ฑ ๋ฉ”๋‰ด๊ฐ€ ํ‘œ์‹œ๋˜์ง€ ์•Š๋Š” ์ด์œ ๋Š” ๋ฌด์—‡์ธ๊ฐ€์š”? + +`๋ฉ”๋‰ด ์ˆจ๊ธฐ๊ธฐ` ์˜ต์…˜์ด ์ผœ์ ธ ์žˆ๋Š” ๊ฒฝ์šฐ - alt ํ‚ค(๋˜๋Š” ์ธ์•ฑ ๋ฉ”๋‰ด ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ \` [๋ฐฑํ‹ฑ] ํ‚ค)๋กœ ๋ฉ”๋‰ด๋ฅผ ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.