diff --git a/README.md b/README.md index aa825711d..ae5e0b151 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ # Available for +Packaging status + ## Windows - Winget: ```winget install "YouTube Music Desktop App"``` or ```winget install Ytmdesktop.Ytmdesktop``` diff --git a/electron-builder-deploy64.yml b/electron-builder-deploy64.yml index 855b62eef..d4f0f5294 100644 --- a/electron-builder-deploy64.yml +++ b/electron-builder-deploy64.yml @@ -3,6 +3,15 @@ appId: app.ytmd files: - '**/*' + - "!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}" + - "!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}" + - "!**/node_modules/*.d.ts" + - "!**/node_modules/.bin" + - "!**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}" + - "!**/._*" + - "!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}" + - "!**/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}" + - "!**/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}" - '!LICENSE.md' - '!CODE_OF_CONDUCT.md' - '!CONTRIBUTING.md' diff --git a/electron-builder.yml b/electron-builder.yml index c4f60a02e..1ebe5c607 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -3,6 +3,15 @@ appId: app.ytmd files: - '**/*' + - "!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}" + - "!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}" + - "!**/node_modules/*.d.ts" + - "!**/node_modules/.bin" + - "!**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}" + - "!**/._*" + - "!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}" + - "!**/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}" + - "!**/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}" - '!LICENSE.md' - '!CODE_OF_CONDUCT.md' - '!CONTRIBUTING.md' diff --git a/electron-builder64.yml b/electron-builder64.yml index 047b5291b..cbacb8187 100644 --- a/electron-builder64.yml +++ b/electron-builder64.yml @@ -3,6 +3,15 @@ appId: app.ytmd files: - '**/*' + - "!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}" + - "!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}" + - "!**/node_modules/*.d.ts" + - "!**/node_modules/.bin" + - "!**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}" + - "!**/._*" + - "!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}" + - "!**/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}" + - "!**/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}" - '!LICENSE.md' - '!CODE_OF_CONDUCT.md' - '!CONTRIBUTING.md' diff --git a/main.js b/main.js index 952892815..c45e4dade 100644 --- a/main.js +++ b/main.js @@ -1141,38 +1141,6 @@ function createWindow() { ) ) - switch (settingsProvider.get('settings-miniplayer-size')) { - case '1': - miniplayer.setSize(170, 170) - settingsProvider.set('settings-miniplayer-size', 170) - break - - case '2': - miniplayer.setSize(200, 200) - settingsProvider.set('settings-miniplayer-size', 200) - break - - case '3': - miniplayer.setSize(230, 230) - settingsProvider.set('settings-miniplayer-size', 230) - break - - case '4': - miniplayer.setSize(260, 260) - settingsProvider.set('settings-miniplayer-size', 260) - break - - case '5': - miniplayer.setSize(290, 290) - settingsProvider.set('settings-miniplayer-size', 290) - break - - case '6': - miniplayer.setSize(320, 320) - settingsProvider.set('settings-miniplayer-size', 320) - break - } - let miniplayerPosition = settingsProvider.get('miniplayer-position') if (miniplayerPosition != undefined) { miniplayer.setPosition( @@ -1197,17 +1165,21 @@ function createWindow() { let storeMiniplayerSizeTimer miniplayer.on('resize', function (e) { - let size = miniplayer.getSize() - if (storeMiniplayerSizeTimer) { - clearTimeout(storeMiniplayerSizeTimer) + try { + let size = miniplayer.getSize() + if (storeMiniplayerSizeTimer) { + clearTimeout(storeMiniplayerSizeTimer) + } + storeMiniplayerSizeTimer = setTimeout(() => { + settingsProvider.set( + 'settings-miniplayer-size', + Math.min(...size) + ) + miniplayer.setSize(Math.min(...size), Math.min(...size)) + }, 500) + } catch { + writeLog({ type: 'warn', data: 'error miniplayer resize' }) } - storeMiniplayerSizeTimer = setTimeout(() => { - settingsProvider.set( - 'settings-miniplayer-size', - Math.min(...size) - ) - miniplayer.setSize(Math.min(...size), Math.min(...size)) - }, 500) }) mainWindow.hide() diff --git a/src/pages/settings/settings.js b/src/pages/settings/settings.js index 79ac167fa..3a9f4afe4 100644 --- a/src/pages/settings/settings.js +++ b/src/pages/settings/settings.js @@ -187,7 +187,7 @@ if (elementRangeSkipTrackShorterThan) { elementRangeSkipTrackShorterThan.addEventListener('input', function () { document.getElementById( 'range-skip-track-shorter-than-value' - ).innerText = this.value + ).innerText = this.value == 0 ? `(Disabled) ${this.value}` : this.value settingsProvider.set('settings-skip-track-shorter-than', this.value) }) } @@ -342,7 +342,10 @@ function loadSettings() { ).value = settingsSkipTrackShorterThan document.getElementById( 'range-skip-track-shorter-than-value' - ).innerText = settingsSkipTrackShorterThan + ).innerText = + settingsSkipTrackShorterThan == 0 + ? `(Disabled) ${settingsSkipTrackShorterThan}` + : settingsSkipTrackShorterThan } document.getElementById('app-version').innerText = remote.app.getVersion()