Skip to content

Commit 2294102

Browse files
authored
Merge pull request #1297 from nnnlog/master
fix(downloader): Korean filename is broken on non-macOS devices
2 parents b6894dc + d69a07d commit 2294102

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

plugins/downloader/back.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,13 @@ async function downloadSongUnsafe(
199199
presetSetting = presets[preset];
200200
}
201201

202-
const filename = filenamify(`${name}.${presetSetting?.extension ?? 'mp3'}`, {
202+
let filename = filenamify(`${name}.${presetSetting?.extension ?? 'mp3'}`, {
203203
replacement: '_',
204204
maxLength: 255,
205205
});
206+
if (!is.macOS()) {
207+
filename = filename.normalize('NFC');
208+
}
206209
const filePath = join(dir, filename);
207210

208211
if (config.get('skipExisting') && existsSync(filePath)) {

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Some predefined themes are available in https://github.com/kerichdev/themes-for-
178178
```bash
179179
git clone https://github.com/th-ch/youtube-music
180180
cd youtube-music
181-
npm
181+
npm ci
182182
npm run start
183183
```
184184

0 commit comments

Comments
 (0)