From 4a735f72bc8335c4dabc5b06a22f59a023ef5f5e Mon Sep 17 00:00:00 2001 From: FSCorrupt <45659314+fscorrupt@users.noreply.github.com> Date: Wed, 27 Mar 2024 12:43:56 +0100 Subject: [PATCH] fix plex query #3 --- PlexPosterMaker.ps1 | 7 ++++--- Release.txt | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/PlexPosterMaker.ps1 b/PlexPosterMaker.ps1 index 73ebc7b..ded0d23 100644 --- a/PlexPosterMaker.ps1 +++ b/PlexPosterMaker.ps1 @@ -3,7 +3,7 @@ param ( [switch]$Testing ) -$CurrentScriptVersion = "1.0.46" +$CurrentScriptVersion = "1.0.47" $global:HeaderWritten = $false $ProgressPreference = 'SilentlyContinue' @@ -3269,7 +3269,7 @@ else { Write-Entry -Subtext "Plex Lib Paths before split: $($Library.path)" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Debug Write-Entry -Subtext "Plex Lib Paths after split: $libpaths" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Debug foreach ($libpath in $libpaths) { - if ($location -like "$libpath*") { + if ($location -like "$libpath/*" -or $location -like "$libpath\*") { Write-Entry -Subtext "Location: $location" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Debug Write-Entry -Subtext "Libpath: $libpath" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Debug $Matchedpath = AddTrailingSlash $libpath @@ -3303,7 +3303,7 @@ else { Write-Entry -Subtext "Plex Lib Paths before split: $($Library.path)" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Debug Write-Entry -Subtext "Plex Lib Paths after split: $libpaths" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Debug foreach ($libpath in $libpaths) { - if ($location -like "$libpath*") { + if ($location -like "$libpath/*" -or $location -like "$libpath\*") { Write-Entry -Subtext "Location: $location" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Debug Write-Entry -Subtext "Libpath: $libpath" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Debug $Matchedpath = AddTrailingSlash $libpath @@ -3361,6 +3361,7 @@ else { $temp | Add-Member -MemberType NoteProperty -Name "PlexSeasonUrls" -Value $SeasonPosterUrl $Libraries += $temp Write-Entry -Subtext "Found [$($temp.title)] of type $($temp.{Library Type}) in [$($temp.{Library Name})]" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Debug + Write-Entry -Subtext "--------------------------------------------------------------------------------" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Debug } } } diff --git a/Release.txt b/Release.txt index 9e6b608..de0434d 100644 --- a/Release.txt +++ b/Release.txt @@ -1 +1 @@ -1.0.46 \ No newline at end of file +1.0.47 \ No newline at end of file