Merge pull request #653 from chengww5217/fix/download-config

fix(download): 下载设置抽屉打开时路径显示为空
This commit is contained in:
Alger
2026-05-10 12:23:31 +08:00
committed by GitHub
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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;
} }
+4 -4
View File
@@ -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'
); );