Skip to content

Commit c2f7a6c

Browse files
committed
location replace fix if empty
1 parent 8f0376c commit c2f7a6c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Posterizarr.ps1

+7-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ param (
88
[string]$mediatype
99
)
1010

11-
$CurrentScriptVersion = "1.2.29"
11+
$CurrentScriptVersion = "1.2.30"
1212
$global:HeaderWritten = $false
1313
$ProgressPreference = 'SilentlyContinue'
1414

@@ -7742,7 +7742,9 @@ else {
77427742
$tvdbpattern = 'tvdb://(\d+)'
77437743
if ($Metadata.MediaContainer.$contentquery.Location) {
77447744
$location = $Metadata.MediaContainer.$contentquery.Location.path
7745-
$location = $location.replace('\\?\', '')
7745+
if ($location){
7746+
$location = $location.replace('\\?\', '')
7747+
}
77467748
if ($location.count -gt '1') {
77477749
$location = $location[0]
77487750
$MultipleVersions = $true
@@ -7774,7 +7776,9 @@ else {
77747776
}
77757777
Else {
77767778
$location = $Metadata.MediaContainer.$contentquery.media.part.file
7777-
$location = $location.replace('\\?\', '')
7779+
if ($location){
7780+
$location = $location.replace('\\?\', '')
7781+
}
77787782
if ($location.count -gt '1') {
77797783
Write-Entry -Subtext "Multi File Locations: $location" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Debug
77807784
$location = $location[0]

Release.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.29
1+
1.2.30

0 commit comments

Comments
 (0)