mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
fix(downloader): fix #2371
This commit is contained in:
@ -172,6 +172,8 @@ function downloadSongOnFinishSetup({
|
|||||||
let duration: number | undefined;
|
let duration: number | undefined;
|
||||||
let time = 0;
|
let time = 0;
|
||||||
|
|
||||||
|
const defaultDownloadFolder = app.getPath('downloads');
|
||||||
|
|
||||||
registerCallback((songInfo: SongInfo) => {
|
registerCallback((songInfo: SongInfo) => {
|
||||||
if (
|
if (
|
||||||
!songInfo.isPaused &&
|
!songInfo.isPaused &&
|
||||||
@ -185,7 +187,9 @@ function downloadSongOnFinishSetup({
|
|||||||
) {
|
) {
|
||||||
downloadSong(
|
downloadSong(
|
||||||
currentUrl,
|
currentUrl,
|
||||||
config.downloadOnFinish.folder ?? config.downloadFolder,
|
config.downloadOnFinish.folder ??
|
||||||
|
config.downloadFolder ??
|
||||||
|
defaultDownloadFolder,
|
||||||
);
|
);
|
||||||
} else if (
|
} else if (
|
||||||
config.downloadOnFinish.mode === 'percent' &&
|
config.downloadOnFinish.mode === 'percent' &&
|
||||||
@ -193,7 +197,9 @@ function downloadSongOnFinishSetup({
|
|||||||
) {
|
) {
|
||||||
downloadSong(
|
downloadSong(
|
||||||
currentUrl,
|
currentUrl,
|
||||||
config.downloadOnFinish.folder ?? config.downloadFolder,
|
config.downloadOnFinish.folder ??
|
||||||
|
config.downloadFolder ??
|
||||||
|
defaultDownloadFolder,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user