diff --git a/build-config/runner-dev.js b/build-config/runner-dev.js index 5936d5ba..3d54f44c 100644 --- a/build-config/runner-dev.js +++ b/build-config/runner-dev.js @@ -167,7 +167,6 @@ function startMain() { } function startElectron() { - console.log('startElectron') let args = [ '--inspect=5858', // 'NODE_ENV=development', diff --git a/src/main/modules/winMain/index.ts b/src/main/modules/winMain/index.ts index 7086f124..9ffca140 100644 --- a/src/main/modules/winMain/index.ts +++ b/src/main/modules/winMain/index.ts @@ -87,9 +87,9 @@ export default () => { if (status.collect != null) taskBarButtonFlags.collect = status.collect setThumbarButtons(taskBarButtonFlags) } - if (status.progress != null && global.lx.player_status.duration) { - const progress = status.progress / global.lx.player_status.duration - if (progress.toFixed(2) != progressStatus.progress.toFixed(2) && showProgress) { + if (showProgress && status.progress != null) { + const progress = global.lx.player_status.duration ? status.progress / global.lx.player_status.duration : 0 + if (progress.toFixed(2) != progressStatus.progress.toFixed(2)) { progressStatus.progress = progress < 0.01 ? 0.01 : progress setProgressBar(progressStatus.progress, { mode: progressStatus.status,