Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.25.1 #46

Merged
merged 1 commit into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions build/functions/Invoke-ProcessMovie.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,19 @@ function invoke-processmovie {
for ($i = 0; $i -lt $max; $i++) {
# This is error handling in case free space on a drive runs out.
if ($targetfiles[$i].Length -gt 0) {
# If the source file is larger than the transcoded file
# If the source file is smaller than the transcoded file
if ($sourcefiles[$i].Length -lt $targetfiles[$i].Length) {
Write-Output "info: Transcoded file was larger. Removing the transcoded file and updating metadata only on source file."
Remove-Item $targetfiles[$i].FullName -Force -Verbose
ffmpeg -i $sourcefiles[$i].fullname -map 0:v:0? -map 0:a? -map 0:s? -metadata title="" -metadata description="" -metadata COMMENT="transcoded" -c copy $targetfiles[$i].FullName
ffmpeg -hide_banner -loglevel error -stats -i $sourcefiles[$i].fullname -map 0:v:0? -map 0:a? -map 0:s? -metadata title="" -metadata description="" -metadata COMMENT="transcoded" -c copy $targetfiles[$i].FullName
Remove-Item $sourcefiles[$i].fullname -Force -Verbose
}
# If the source file is smaller and backups are kept
# If the source file is larger and backups are kept
elseif ($env:BACKUPPROCESSED -eq 'true') {
Move-Item $sourcefiles[$i].fullname $env:FFToolsTarget/recover -Force -Verbose
(Get-ChildItem $env:FFToolsTarget/recover/($sourcefiles[$i]).name).lastwritetime = (Get-Date)
}
# If the source file is smaller and backups are not kept
# If the source file is larger and backups are not kept
else {
Remove-Item $sourcefiles[$i].fullname -Force -Verbose
}
Expand Down
9 changes: 5 additions & 4 deletions build/functions/Invoke-ProcessShow.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,19 @@ function invoke-processshow {
for ($i = 0; $i -lt $max; $i++) {
# This is error handling in case free space on a drive runs out.
if ($targetfiles[$i].Length -gt 0) {
# If the source file is larger than the transcoded file
# If the source file is smaller than the transcoded file
if ($sourcefiles[$i].Length -lt $targetfiles[$i].Length) {
Write-Output "info: Transcoded file was larger. Removing the transcoded file and updating metadata only on source file."
Remove-Item $targetfiles[$i].FullName -Force -Verbose
ffmpeg -i $sourcefiles[$i].fullname -map 0:v:0? -map 0:a? -map 0:s? -metadata title="" -metadata description="" -metadata COMMENT="transcoded" -c copy $targetfiles[$i].FullName
ffmpeg -hide_banner -loglevel error -stats -i $sourcefiles[$i].fullname -map 0:v:0? -map 0:a? -map 0:s? -metadata title="" -metadata description="" -metadata COMMENT="transcoded" -c copy $targetfiles[$i].FullName
Remove-Item $sourcefiles[$i].fullname -Force -Verbose
}
# If the source file is smaller and backups are kept
# If the source file is larger and backups are kept
elseif ($env:BACKUPPROCESSED -eq 'true') {
Move-Item $sourcefiles[$i].fullname $env:FFToolsTarget/recover -Force -Verbose
(Get-ChildItem $env:FFToolsTarget/recover/($sourcefiles[$i]).name).lastwritetime = (Get-Date)
}
# If the source file is smaller and backups are not kept
# If the source file is larger and backups are not kept
else {
Remove-Item $sourcefiles[$i].fullname -Force -Verbose
}
Expand Down
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@
- 2.24.0 Change backup database frequency to only one week.
- 2.24.1 Update readme and remove legacy module functions
- 2.24.2 Failed to use a dev branch for 2.24.1 and workflows didn't run. Using 2.24.2 to trigger workflows and test for bugs.
- 2.25.0 Add the following to surpress verbose output, but still display stats. This will make logs easier to read by removing thousands of unneeded lines. (-hide_banner -loglevel error -stats)
- 2.25.0 Add the following to surpress verbose output, but still display stats. This will make logs easier to read by removing thousands of unneeded lines. (-hide_banner -loglevel error -stats)
- 2.25.1 Add the suppress output parameters to Invoke-Process<media/show> functions. Larger file sizes resulted in updating metadata only and those runs of ffmpeg were missing the parameters.
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.25.0
v2.25.1