From 3592b358f165c53103e881b037066e433184d890 Mon Sep 17 00:00:00 2001 From: TheTaylorLee <53202926+TheTaylorLee@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:19:25 -0600 Subject: [PATCH] 4.5.2 --- build/functions/Invoke-MEDIAMoviesToProcess.ps1 | 5 +---- build/functions/Invoke-MEDIAShowsToProcess.ps1 | 5 +---- changelog.md | 3 ++- version | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/build/functions/Invoke-MEDIAMoviesToProcess.ps1 b/build/functions/Invoke-MEDIAMoviesToProcess.ps1 index 31e956b..b759cf3 100644 --- a/build/functions/Invoke-MEDIAMoviesToProcess.ps1 +++ b/build/functions/Invoke-MEDIAMoviesToProcess.ps1 @@ -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 } @@ -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 } } diff --git a/build/functions/Invoke-MEDIAShowsToProcess.ps1 b/build/functions/Invoke-MEDIAShowsToProcess.ps1 index d990400..76c5fcf 100644 --- a/build/functions/Invoke-MEDIAShowsToProcess.ps1 +++ b/build/functions/Invoke-MEDIAShowsToProcess.ps1 @@ -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 } @@ -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 } } diff --git a/changelog.md b/changelog.md index 85aec73..3062884 100644 --- a/changelog.md +++ b/changelog.md @@ -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. \ No newline at end of file +- 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. \ No newline at end of file diff --git a/version b/version index dfe33e0..d694e4a 100644 --- a/version +++ b/version @@ -1 +1 @@ -v4.5.1 \ No newline at end of file +v4.5.2 \ No newline at end of file