Skip to content

Commit

Permalink
fix: only textless is wanted
Browse files Browse the repository at this point in the history
if xx is first in preferred lang ordner and no textless was found it skipped with message that only textless is wanted, which is false.
  • Loading branch information
fscorrupt committed Jul 9, 2024
1 parent f21ca73 commit 818cbde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions Posterizarr.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ param (
[string]$mediatype
)

$CurrentScriptVersion = "1.2.34"
$CurrentScriptVersion = "1.2.35"
$global:HeaderWritten = $false
$ProgressPreference = 'SilentlyContinue'

Expand Down Expand Up @@ -524,7 +524,7 @@ function GetTMDBMoviePoster {
if ($response.images.posters) {
$NoLangPoster = ($response.images.posters | Where-Object iso_639_1 -eq $null)
if (!$NoLangPoster) {
if (!$global:OnlyTextless) {
if (!$global:OnlyTextless -eq 'true') {
$posterpath = (($response.images.posters | Sort-Object vote_average -Descending)[0]).file_path
$global:posterurl = "https://image.tmdb.org/t/p/original$posterpath"
if ($global:FavProvider -eq 'TMDB') {
Expand Down Expand Up @@ -623,7 +623,7 @@ function GetTMDBMovieBackground {
if ($response.images.backdrops) {
$NoLangPoster = ($response.images.backdrops | Where-Object iso_639_1 -eq $null)
if (!$NoLangPoster) {
if (!$global:OnlyTextless) {
if (!$global:OnlyTextless -eq 'true') {
$posterpath = (($response.images.backdrops | Sort-Object vote_average -Descending)[0]).file_path
$global:posterurl = "https://image.tmdb.org/t/p/original$posterpath"
if ($global:FavProvider -eq 'TMDB') {
Expand Down Expand Up @@ -740,7 +740,7 @@ function GetTMDBShowPoster {
if ($response.images.posters) {
$NoLangPoster = ($response.images.posters | Where-Object iso_639_1 -eq $null)
if (!$NoLangPoster) {
if (!$global:OnlyTextless) {
if (!$global:OnlyTextless -eq 'true') {
$posterpath = (($response.images.posters | Sort-Object vote_average -Descending)[0]).file_path
$global:posterurl = "https://image.tmdb.org/t/p/original$posterpath"
if ($global:FavProvider -eq 'TMDB') {
Expand Down Expand Up @@ -997,7 +997,7 @@ function GetTMDBShowBackground {
if ($response.images.backdrops) {
$NoLangPoster = ($response.images.backdrops | Where-Object iso_639_1 -eq $null)
if (!$NoLangPoster) {
if (!$global:OnlyTextless) {
if (!$global:OnlyTextless -eq 'true') {
$posterpath = (($response.images.backdrops | Sort-Object vote_average -Descending)[0]).file_path
$global:posterurl = "https://image.tmdb.org/t/p/original$posterpath"
if ($global:FavProvider -eq 'TMDB') {
Expand Down Expand Up @@ -2868,9 +2868,11 @@ if ($global:PreferredLanguageOrder.count -eq '1' -and $global:PreferredLanguageO
}
Elseif ($global:PreferredLanguageOrder[0] -eq 'xx') {
$global:PreferTextless = $true
$global:OnlyTextless = $false
}
Else {
$global:PreferTextless = $false
$global:OnlyTextless = $false
}

# Season Lang Settings
Expand Down
2 changes: 1 addition & 1 deletion Release.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.34
1.2.35

0 comments on commit 818cbde

Please sign in to comment.