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

4.5.2 #63

Merged
merged 1 commit into from
Nov 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
5 changes: 1 addition & 4 deletions build/functions/Invoke-MEDIAMoviesToProcess.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ Function Invoke-MEDIAMoviesToProcess {
$filesforprocessing = $files
}
else {
# COMPARE-OBJECT RETURNS FILES THAT ARE IN $FILES FIRST AND THEN ITEMS IN THE DATABASE.
# THIS IS VERY IMPORTANT FOR THE IF FILE EXISTS COMMENTED BLOCK.
# WITHOUT THIS STEP THE EXISTING DB ENTRY COMMENT IS NULLED AND THE FILE WOULD NOT BE PROCESSED.
$filesforprocessing = (Compare-Object $files $transcoded | Sort-Object sideindicator).inputobject
}

Expand Down Expand Up @@ -156,7 +153,7 @@ Function Invoke-MEDIAMoviesToProcess {
else {
$fullname = $file
$modified = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
$query = "Update $TableName SET filesizeMB = NULL, fileexists = 'false', modified = `"$modified`", updatedby = 'Invoke-MEDIAMoviesToProcess' WHERE fullname = `"$fullname`""
$query = "Update $TableName SET filesizeMB = NULL, fileexists = 'false', modified = `"$modified`", updatedby = 'Invoke-MEDIAMoviesToProcess' WHERE fullname = `"$fullname`" and fileexists is NOT false and filesizeMB is NOT NULL"
Invoke-SqliteQuery -ErrorAction Inquire -DataSource $DataSource -Query $query
}
}
Expand Down
5 changes: 1 addition & 4 deletions build/functions/Invoke-MEDIAShowsToProcess.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ Function Invoke-MEDIAShowsToProcess {
$filesforprocessing = $files
}
else {
# COMPARE-OBJECT RETURNS FILES THAT ARE IN $FILES FIRST AND THEN ITEMS IN THE DATABASE.
# THIS IS VERY IMPORTANT FOR THE IF FILE EXISTS COMMENTED BLOCK.
# WITHOUT THIS STEP THE EXISTING DB ENTRY COMMENT IS NULLED AND THE FILE WOULD NOT BE PROCESSED.
$filesforprocessing = (Compare-Object $files $transcoded | Sort-Object sideindicator).inputobject
}

Expand Down Expand Up @@ -156,7 +153,7 @@ Function Invoke-MEDIAShowsToProcess {
else {
$fullname = $file
$modified = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
$query = "Update $TableName SET filesizeMB = NULL, fileexists = 'false', modified = `"$modified`", updatedby = 'Invoke-MEDIAShowsToProcess' WHERE fullname = `"$fullname`""
$query = "Update $TableName SET filesizeMB = NULL, fileexists = 'false', modified = `"$modified`", updatedby = 'Invoke-MEDIAShowsToProcess' WHERE fullname = `"$fullname`" and fileexists is NOT false and filesizeMB is NOT NULL"
Invoke-SqliteQuery -ErrorAction Inquire -DataSource $DataSource -Query $query
}
}
Expand Down
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,5 @@
- 4.4.0 Add support for repeating filenames in different directories.
- 4.4.1 Add verbosity to log output.
- 4.5.0 Carryover subsampling and bit depth metadata explicitly. While likely included by default it is now specified.
- 4.5.1 Add repeat headers in with HDR metadata to prevent warnings.
- 4.5.1 Add repeat headers in with HDR metadata to prevent warnings.
- 4.5.2 Modify Invoke-Media(Shows/Movies)ToProcess function so that items items marked as no longer existing are only updated in the table once prior to update-processed running.
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v4.5.1
v4.5.2
Loading