From b5d76bdce7cb27a68ef5012887ed251dae7bb524 Mon Sep 17 00:00:00 2001 From: Chaphasilor Date: Fri, 22 Apr 2022 18:30:43 +0200 Subject: [PATCH 1/2] fix variable scope for offset validation --- src/index.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/index.js b/src/index.js index 4aee95e..3d9f5a6 100644 --- a/src/index.js +++ b/src/index.js @@ -250,21 +250,23 @@ class VideoSyncCommand extends Command { // check if one of the videos is warped let videoWarped = false if (!flags.noOffsetValidation) { + const offsetValidationSpinner = ora(`Checking if found offset applies to the whole video...`).start(); try { videoWarped = ! await validateOffset(args.destination, args.source, videoOffset) } catch (err) { console.error(`Error while checking if found offset applies to the whole video:`, err) } - } - // log warning about warped video - if (videoWarped && flags.confirm) { - offsetValidationSpinner.warn(`Syncing the tracks might not work well because one of the videos appears to be warped.`) - } else if (!videoWarped) { - offsetValidationSpinner.succeed(`Offset is valid.`) - } else { - offsetValidationSpinner.stop() + // log warning about warped video + if (videoWarped && flags.confirm) { + offsetValidationSpinner.warn(`Syncing the tracks might not work well because one of the videos appears to be warped.`) + } else if (!videoWarped) { + offsetValidationSpinner.succeed(`Offset is valid.`) + } else { + offsetValidationSpinner.stop() + } + } let continueWithMerging = answers.output !== undefined && (selectedTracks.audio.length > 0 || selectedTracks.subs.length > 0) From f6e50db6faa28e0057ec4a3bdc5592299d7685df Mon Sep 17 00:00:00 2001 From: Chaphasilor Date: Fri, 22 Apr 2022 18:33:20 +0200 Subject: [PATCH 2/2] update package version to make it clear it's not being used - release versions are based on the git tag, not the version in package.json --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index a273873..fabe8b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "video-sync", - "version": "0.8.0", + "version": "0.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7050f76..d1d77aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "video-sync", - "version": "0.8.0", + "version": "0.0.0", "author": "Chaphasilor", "bin": { "video-sync": "./bin/run"