The swiss army knife of lossless video/audio editing
add setting to disable auto updates
Mikael Finstadd7922b94654b
diff --git a/public/configStore.js b/public/configStore.jsindex 40b8d4fc..2b223d28 100644--- a/public/configStore.js+++ b/public/configStore.js@@ -117,6 +117,7 @@ const defaults = {captureFrameQuality: 0.95,captureFrameFileNameFormat: 'timestamp',enableNativeHevc: true,+ enableUpdateCheck: true,};// For portable app: https://github.com/mifi/lossless-cut/issues/645diff --git a/public/electron.js b/public/electron.jsindex 5dbcdb95..bfa55518 100644--- a/public/electron.js+++ b/public/electron.js@@ -202,7 +202,9 @@ if (!argv.allowMultipleInstances && !safeRequestSingleInstanceLock({ argv: procecreateWindow();updateMenu();- if (!process.windowsStore && !process.mas) {+ const enableUpdateCheck = configStore.get('enableUpdateCheck');++ if (enableUpdateCheck && !process.windowsStore && !process.mas) {newVersion = await checkNewVersion();// newVersion = '1.2.3';if (newVersion) updateMenu();diff --git a/src/Settings.jsx b/src/Settings.jsxindex c7152d5b..e7e3fab3 100644--- a/src/Settings.jsx+++ b/src/Settings.jsx@@ -7,7 +7,7 @@ import CaptureFormatButton from './components/CaptureFormatButton';import AutoExportToggler from './components/AutoExportToggler';import useUserSettings from './hooks/useUserSettings';import { askForFfPath } from './dialogs';-import { isMasBuild } from './util';+import { isMasBuild, isStoreBuild } from './util';import { langNames } from './util/constants';import { keyMap } from './hooks/useTimelineScroll';@@ -31,7 +31,7 @@ const Settings = memo(({}) => {const { t } = useTranslation();- const { customOutDir, changeOutDir, keyframeCut, toggleKeyframeCut, timecodeFormat, setTimecodeFormat, invertCutSegments, setInvertCutSegments, askBeforeClose, setAskBeforeClose, enableAskForImportChapters, setEnableAskForImportChapters, enableAskForFileOpenAction, setEnableAskForFileOpenAction, autoSaveProjectFile, setAutoSaveProjectFile, invertTimelineScroll, setInvertTimelineScroll, language, setLanguage, ffmpegExperimental, setFfmpegExperimental, hideNotifications, setHideNotifications, autoLoadTimecode, setAutoLoadTimecode, enableTransferTimestamps, setEnableTransferTimestamps, enableAutoHtml5ify, setEnableAutoHtml5ify, customFfPath, setCustomFfPath, storeProjectInWorkingDir, setStoreProjectInWorkingDir, enableOverwriteOutput, setEnableOverwriteOutput, mouseWheelZoomModifierKey, setMouseWheelZoomModifierKey, captureFrameMethod, setCaptureFrameMethod, captureFrameQuality, setCaptureFrameQuality, captureFrameFileNameFormat, setCaptureFrameFileNameFormat, enableNativeHevc, setEnableNativeHevc } = useUserSettings();+ const { customOutDir, changeOutDir, keyframeCut, toggleKeyframeCut, timecodeFormat, setTimecodeFormat, invertCutSegments, setInvertCutSegments, askBeforeClose, setAskBeforeClose, enableAskForImportChapters, setEnableAskForImportChapters, enableAskForFileOpenAction, setEnableAskForFileOpenAction, autoSaveProjectFile, setAutoSaveProjectFile, invertTimelineScroll, setInvertTimelineScroll, language, setLanguage, ffmpegExperimental, setFfmpegExperimental, hideNotifications, setHideNotifications, autoLoadTimecode, setAutoLoadTimecode, enableTransferTimestamps, setEnableTransferTimestamps, enableAutoHtml5ify, setEnableAutoHtml5ify, customFfPath, setCustomFfPath, storeProjectInWorkingDir, setStoreProjectInWorkingDir, enableOverwriteOutput, setEnableOverwriteOutput, mouseWheelZoomModifierKey, setMouseWheelZoomModifierKey, captureFrameMethod, setCaptureFrameMethod, captureFrameQuality, setCaptureFrameQuality, captureFrameFileNameFormat, setCaptureFrameFileNameFormat, enableNativeHevc, setEnableNativeHevc, enableUpdateCheck, setEnableUpdateCheck } = useUserSettings();const onLangChange = useCallback((e) => {const { value } = e.target;@@ -314,6 +314,19 @@ const Settings = memo(({</Row>)}+ {!isStoreBuild && (+ <Row>+ <KeyCell>{t('Check for updates on startup?')}</KeyCell>+ <Table.TextCell>+ <Checkbox+ label={t('Check for updates')}+ checked={enableUpdateCheck}+ onChange={e => setEnableUpdateCheck(e.target.checked)}+ />+ </Table.TextCell>+ </Row>+ )}+<Row><KeyCell>{t('Enable HEVC / H265 hardware decoding (you may need to turn this off if you have problems with HEVC files)')}</KeyCell><Table.TextCell>diff --git a/src/hooks/useUserSettingsRoot.js b/src/hooks/useUserSettingsRoot.jsindex 182b48da..bb0c62b3 100644--- a/src/hooks/useUserSettingsRoot.js+++ b/src/hooks/useUserSettingsRoot.js@@ -127,6 +127,9 @@ export default () => {useEffect(() => safeSetConfig({ captureFrameFileNameFormat }), [captureFrameFileNameFormat]);const [enableNativeHevc, setEnableNativeHevc] = useState(safeGetConfigInitial('enableNativeHevc'));useEffect(() => safeSetConfig({ enableNativeHevc }), [enableNativeHevc]);+ const [enableUpdateCheck, setEnableUpdateCheck] = useState(safeGetConfigInitial('enableUpdateCheck'));+ useEffect(() => safeSetConfig({ enableUpdateCheck }), [enableUpdateCheck]);+const resetKeyBindings = useCallback(() => {configStore.reset('keyBindings');@@ -231,5 +234,7 @@ export default () => {setCaptureFrameFileNameFormat,enableNativeHevc,setEnableNativeHevc,+ enableUpdateCheck,+ setEnableUpdateCheck,};};