Merge pull request #1297 from nnnlog/master

fix(downloader): Korean filename is broken on non-macOS devices
This commit is contained in:
JellyBrick
2023-10-10 16:48:43 +09:00
committed by GitHub
2 changed files with 5 additions and 2 deletions

View File

@ -199,10 +199,13 @@ async function downloadSongUnsafe(
presetSetting = presets[preset];
}
const filename = filenamify(`${name}.${presetSetting?.extension ?? 'mp3'}`, {
let filename = filenamify(`${name}.${presetSetting?.extension ?? 'mp3'}`, {
replacement: '_',
maxLength: 255,
});
if (!is.macOS()) {
filename = filename.normalize('NFC');
}
const filePath = join(dir, filename);
if (config.get('skipExisting') && existsSync(filePath)) {

View File

@ -178,7 +178,7 @@ Some predefined themes are available in https://github.com/kerichdev/themes-for-
```bash
git clone https://github.com/th-ch/youtube-music
cd youtube-music
npm
npm ci
npm run start
```