Skip to content

Commit

Permalink
v4.1.2 (#66)
Browse files Browse the repository at this point in the history
*Fixed minor issue where failover threshold percentage was not being dynamically generated, leading to possibly incorrect reporting in console and logging.
Closes #64
  • Loading branch information
BrianDMG authored Apr 27, 2020
1 parent 136c44d commit ae7d402
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conv2mp4-ps.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<#======================================================================================================================
conv2mp4-ps v4.1.1 - https://github.com/BrianDMG/conv2mp4-ps
conv2mp4-ps v4.1.2 - https://github.com/BrianDMG/conv2mp4-ps
This Powershell script will recursively search through a user-defined file path and convert all videos of user-specified
include_file_types to MP4 with H264 video and AAC audio using ffmpeg. If a conversion failure is detected, the script re-encodes
Expand Down
4 changes: 2 additions & 2 deletions files/func/PrintEncodeError.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# If new file is over 25% smaller than the original file, trigger encoding failure
# If file size delta exceeds failover threshold, trigger encoding failure
Function PrintEncodeError {
$fileSizeDelta = [Math]::Round($targetFileCompare.length - $sourceFileCompare.length)/1MB
$fileSizeDelta = [Math]::Round($fileSizeDelta, 2)
Try {
Remove-Item -LiteralPath $targetFile -Force -ErrorAction Stop
Log "$($time.Invoke()) EXCEPTION: New file is over 25% smaller ($($fileSizeDelta)MB)."
Log "$($time.Invoke()) EXCEPTION: New file is over $($cfg.failover_threshold -replace '[.]','')% smaller ($($fileSizeDelta)MB)."
Log "$($time.Invoke()) $targetFileRenamed deleted."
Log "$($time.Invoke()) FAILOVER: Re-encoding $sourceFile with Handbrake."
}
Expand Down
2 changes: 1 addition & 1 deletion files/prop/properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Version
version=4.1.1
version=4.1.2
platform=ps

#URLs
Expand Down

0 comments on commit ae7d402

Please sign in to comment.