mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-17 02:07:29 +08:00
Merge pull request #653 from chengww5217/fix/download-config
fix(download): 下载设置抽屉打开时路径显示为空
This commit is contained in:
@@ -523,7 +523,7 @@ class DownloadManager {
|
|||||||
} else {
|
} else {
|
||||||
// Full response (200) - start from beginning
|
// Full response (200) - start from beginning
|
||||||
task.loaded = 0;
|
task.loaded = 0;
|
||||||
const contentLength = response.headers['content-length'];
|
const contentLength = response.headers['content-length'] as string;
|
||||||
task.total = contentLength ? parseInt(contentLength, 10) : 0;
|
task.total = contentLength ? parseInt(contentLength, 10) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -915,16 +915,16 @@ const saveDownloadSettings = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const initDownloadSettings = async () => {
|
const initDownloadSettings = async () => {
|
||||||
const path = await window.electron.ipcRenderer.invoke('get-store-value', 'set.downloadPath');
|
const path = window.electron.ipcRenderer.sendSync('get-store-value', 'set.downloadPath');
|
||||||
const nameFormat = await window.electron.ipcRenderer.invoke(
|
const nameFormat = window.electron.ipcRenderer.sendSync(
|
||||||
'get-store-value',
|
'get-store-value',
|
||||||
'set.downloadNameFormat'
|
'set.downloadNameFormat'
|
||||||
);
|
);
|
||||||
const separator = await window.electron.ipcRenderer.invoke(
|
const separator = window.electron.ipcRenderer.sendSync(
|
||||||
'get-store-value',
|
'get-store-value',
|
||||||
'set.downloadSeparator'
|
'set.downloadSeparator'
|
||||||
);
|
);
|
||||||
const saveLyric = await window.electron.ipcRenderer.invoke(
|
const saveLyric = window.electron.ipcRenderer.sendSync(
|
||||||
'get-store-value',
|
'get-store-value',
|
||||||
'set.downloadSaveLyric'
|
'set.downloadSaveLyric'
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user