Skip to content

Commit

Permalink
Merge pull request #8 from Chaphasilor/dev
Browse files Browse the repository at this point in the history
Update from dev
  • Loading branch information
Chaphasilor authored Apr 22, 2022
2 parents 848b18f + f6e50db commit 90cb048
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "video-sync",
"version": "0.8.0",
"version": "0.0.0",
"author": "Chaphasilor",
"bin": {
"video-sync": "./bin/run"
Expand Down
18 changes: 10 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 90cb048

Please sign in to comment.