Skip to content

Commit

Permalink
fix season/poster lang search
Browse files Browse the repository at this point in the history
  • Loading branch information
fscorrupt committed Apr 6, 2024
1 parent cdcd919 commit c816387
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
23 changes: 13 additions & 10 deletions PosterMaker.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ param (
[string]$mediatype
)

$CurrentScriptVersion = "1.1.2"
$CurrentScriptVersion = "1.1.3"
$global:HeaderWritten = $false
$ProgressPreference = 'SilentlyContinue'

Expand Down Expand Up @@ -2513,11 +2513,12 @@ if (!$global:PreferredLanguageOrder) {
$global:PreferredLanguageOrderTMDB = $global:PreferredLanguageOrder.Replace('xx', 'null')
$global:PreferredLanguageOrderFanart = $global:PreferredLanguageOrder.Replace('xx', '00')
$global:PreferredLanguageOrderTVDB = $global:PreferredLanguageOrder.Replace('xx', 'null')
if ($global:PreferredLanguageOrder[0] -eq 'xx' -or $global:PreferredLanguageOrder -eq 'xx') {
if ($global:PreferredLanguageOrder.count -eq '1' -and $global:PreferredLanguageOrder -eq 'xx'){
$global:PreferTextless = $true
$global:OnlyTextless = $true
}
Elseif ($global:PreferredLanguageOrder[0] -eq 'xx') {
$global:PreferTextless = $true
if ( $PreferredLanguageOrder.count -eq "1") {
$global:OnlyTextless = $true
}
}
Else {
$global:PreferTextless = $false
Expand All @@ -2531,15 +2532,17 @@ if (!$global:PreferredSeasonLanguageOrder) {
$global:PreferredSeasonLanguageOrderTMDB = $global:PreferredSeasonLanguageOrder.Replace('xx', 'null')
$global:PreferredSeasonLanguageOrderFanart = $global:PreferredSeasonLanguageOrder.Replace('xx', '00')
$global:PreferredSeasonLanguageOrderTVDB = $global:PreferredSeasonLanguageOrder.Replace('xx', 'null')
if ($global:PreferredSeasonLanguageOrder[0] -eq 'xx' -or $global:PreferredSeasonLanguageOrder -eq 'xx') {
if ($global:PreferredSeasonLanguageOrder.count -eq '1' -and $global:PreferredSeasonLanguageOrder -eq 'xx'){
$global:SeasonPreferTextless = $true
$global:SeasonOnlyTextless = $true
}
Elseif ($global:PreferredSeasonLanguageOrder[0] -eq 'xx') {
$global:SeasonPreferTextless = $true
if ( $PreferredSeasonLanguageOrder.count -eq "1") {
$global:SeasonOnlyTextless = $true
}
}
Else {
$global:SeasonPreferTextless = $false
}

# default to TMDB if favprovider missing
if (!$global:FavProvider) {
Write-Entry -Message "FavProvider not set in config, setting it to 'TMDB' for you" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Yellow -log Warning
Expand Down Expand Up @@ -8405,7 +8408,7 @@ else {
$global:posterurl = GetFanartSeasonPoster
$global:IsFallback = $true
}
if ($global:posterurl -and $global:PreferTextless -eq 'True' -and !$global:TextlessPoster) {
if ($global:posterurl -and $global:SeasonPreferTextless -eq 'True' -and !$global:TextlessPoster) {
$global:posterurl = GetFanartSeasonPoster
$global:IsFallback = $true
}
Expand Down
2 changes: 1 addition & 1 deletion Release.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.2
1.1.3

0 comments on commit c816387

Please sign in to comment.