diff --git a/Posterizarr.ps1 b/Posterizarr.ps1 index f9bbfb2..cc28ed4 100644 --- a/Posterizarr.ps1 +++ b/Posterizarr.ps1 @@ -8,7 +8,7 @@ param ( [string]$mediatype ) -$CurrentScriptVersion = "1.2.22" +$CurrentScriptVersion = "1.2.23" $global:HeaderWritten = $false $ProgressPreference = 'SilentlyContinue' @@ -4600,19 +4600,42 @@ Elseif ($Tautulli) { Write-Entry -Subtext "Took TMDB Fallback poster because it is your Fav Provider" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Info $global:IsFallback = $true } + if ($global:FavProvider -eq 'TVDB' -and !$global:posterurl) { + if ($entry.tmdbid) { + $global:posterurl = GetTMDBMoviePoster + $global:IsFallback = $true + } + if (!$global:posterurl) { + $global:posterurl = GetFanartMoviePoster + $global:IsFallback = $true + } + } } if ($global:OnlyTextless -and !$global:posterurl) { - $global:posterurl = GetFanartMoviePoster - if (!$global:FavProvider -eq 'FANART') { - $global:IsFallback = $true + if ($global:FavProvider -eq 'TVDB') { + if ($entry.tmdbid) { + $global:posterurl = GetTMDBMoviePoster + $global:IsFallback = $true + } + if (!$global:posterurl) { + $global:posterurl = GetFanartMoviePoster + $global:IsFallback = $true + } + } + Else { + $global:posterurl = GetFanartMoviePoster + if (!$global:FavProvider -eq 'FANART') { + $global:IsFallback = $true + } } } if (!$global:posterurl) { - - $global:posterurl = GetTVDBMoviePoster - $global:IsFallback = $true + if ($global:FavProvider -ne 'TVDB') { + $global:posterurl = GetTVDBMoviePoster + $global:IsFallback = $true + } if (!$global:posterurl -and !$global:OnlyTextless) { if ($entry.PlexPosterUrl) { GetPlexArtwork -Type ' a Movie Poster' -ArtUrl $Arturl -TempImage $PosterImage @@ -4894,16 +4917,40 @@ Elseif ($Tautulli) { Write-Entry -Subtext "Took TMDB Fallback background because it is your Fav Provider" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Info $global:IsFallback = $true } + if ($global:FavProvider -eq 'TVDB' -and !$global:posterurl) { + if ($entry.tmdbid) { + $global:posterurl = GetTMDBMovieBackground + $global:IsFallback = $true + } + if (!$global:posterurl) { + $global:posterurl = GetFanartMovieBackground + $global:IsFallback = $true + } + } } if ($global:OnlyTextless -and !$global:posterurl) { - $global:posterurl = GetFanartMovieBackground - if (!$global:FavProvider -eq 'FANART') { - $global:IsFallback = $true + if ($global:FavProvider -eq 'TVDB') { + if ($entry.tmdbid) { + $global:posterurl = GetTMDBMovieBackground + $global:IsFallback = $true + } + if (!$global:posterurl) { + $global:posterurl = GetFanartMovieBackground + $global:IsFallback = $true + } + } + Else { + $global:posterurl = GetFanartMovieBackground + if (!$global:FavProvider -eq 'FANART') { + $global:IsFallback = $true + } } } if (!$global:posterurl) { - $global:posterurl = GetTVDBMovieBackground - $global:IsFallback = $true + if ($global:FavProvider -ne 'TVDB') { + $global:posterurl = GetTVDBMovieBackground + $global:IsFallback = $true + } if (!$global:posterurl) { if ($entry.PlexBackgroundUrl) { GetPlexArtwork -Type ' a Movie Background' -ArtUrl $Arturl -TempImage $backgroundImage @@ -5251,6 +5298,10 @@ Elseif ($Tautulli) { $global:IsFallback = $true $global:tvdbalreadysearched = $true } + if ($global:FavProvider -eq 'TVDB' -and $global:TextlessPoster -ne 'true') { + $global:posterurl = GetFanartMoviePoster + $global:IsFallback = $true + } } if (!$global:TextlessPoster -eq 'true' -and $global:posterurl) { @@ -5563,16 +5614,42 @@ Elseif ($Tautulli) { Write-Entry -Subtext "Took TMDB Fallback background because it is your Fav Provider" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Info $global:IsFallback = $true } - } - if ($global:TextlessPoster -eq 'true' -and $global:posterurl) { + if ($global:FavProvider -eq 'TVDB' -and !$global:posterurl) { + if ($entry.tmdbid) { + $global:posterurl = GetTMDBShowBackground + $global:IsFallback = $true + $global:FallbackText = 'True-Background' + } + if (!$global:posterurl) { + $global:posterurl = GetFanartShowBackground + $global:IsFallback = $true + $global:FallbackText = 'True-Background' + } + } } if ($global:OnlyTextless -and !$global:posterurl) { - $global:posterurl = GetFanartShowBackground + if ($global:FavProvider -eq 'TVDB') { + if ($entry.tmdbid) { + $global:posterurl = GetTMDBShowBackground + $global:IsFallback = $true + $global:FallbackText = 'True-Background' + } + if (!$global:posterurl) { + $global:posterurl = GetFanartShowBackground + $global:IsFallback = $true + $global:FallbackText = 'True-Background' + } + } + Else { + $global:posterurl = GetFanartShowBackground + } } if (!$global:posterurl) { - $global:posterurl = GetTVDBShowBackground - $global:IsFallback = $true - + if ($global:FavProvider -ne 'TVDB') { + $global:posterurl = GetTVDBShowBackground + $global:IsFallback = $true + } + $global:FallbackText = 'True-Background' if (!$global:posterurl) { if ($entry.PlexBackgroundUrl) { GetPlexArtwork -Type ' a Show Background' -ArtUrl $Arturl -TempImage $backgroundImage @@ -7879,19 +7956,42 @@ else { Write-Entry -Subtext "Took TMDB Fallback poster because it is your Fav Provider" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Info $global:IsFallback = $true } + if ($global:FavProvider -eq 'TVDB' -and !$global:posterurl) { + if ($entry.tmdbid) { + $global:posterurl = GetTMDBMoviePoster + $global:IsFallback = $true + } + if (!$global:posterurl) { + $global:posterurl = GetFanartMoviePoster + $global:IsFallback = $true + } + } } if ($global:OnlyTextless -and !$global:posterurl) { - $global:posterurl = GetFanartMoviePoster - if (!$global:FavProvider -eq 'FANART') { - $global:IsFallback = $true + if ($global:FavProvider -eq 'TVDB') { + if ($entry.tmdbid) { + $global:posterurl = GetTMDBMoviePoster + $global:IsFallback = $true + } + if (!$global:posterurl) { + $global:posterurl = GetFanartMoviePoster + $global:IsFallback = $true + } + } + Else { + $global:posterurl = GetFanartMoviePoster + if (!$global:FavProvider -eq 'FANART') { + $global:IsFallback = $true + } } } if (!$global:posterurl) { - - $global:posterurl = GetTVDBMoviePoster - $global:IsFallback = $true + if ($global:FavProvider -ne 'TVDB') { + $global:posterurl = GetTVDBMoviePoster + $global:IsFallback = $true + } if (!$global:posterurl -and !$global:OnlyTextless) { if ($entry.PlexPosterUrl) { GetPlexArtwork -Type ' a Movie Poster' -ArtUrl $Arturl -TempImage $PosterImage @@ -8158,16 +8258,40 @@ else { Write-Entry -Subtext "Took TMDB Fallback background because it is your Fav Provider" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Info $global:IsFallback = $true } + if ($global:FavProvider -eq 'TVDB' -and !$global:posterurl) { + if ($entry.tmdbid) { + $global:posterurl = GetTMDBMovieBackground + $global:IsFallback = $true + } + if (!$global:posterurl) { + $global:posterurl = GetFanartMovieBackground + $global:IsFallback = $true + } + } } if ($global:OnlyTextless -and !$global:posterurl) { - $global:posterurl = GetFanartMovieBackground - if (!$global:FavProvider -eq 'FANART') { - $global:IsFallback = $true + if ($global:FavProvider -eq 'TVDB') { + if ($entry.tmdbid) { + $global:posterurl = GetTMDBMovieBackground + $global:IsFallback = $true + } + if (!$global:posterurl) { + $global:posterurl = GetFanartMovieBackground + $global:IsFallback = $true + } + } + Else { + $global:posterurl = GetFanartMovieBackground + if (!$global:FavProvider -eq 'FANART') { + $global:IsFallback = $true + } } } if (!$global:posterurl) { - $global:posterurl = GetTVDBMovieBackground - $global:IsFallback = $true + if ($global:FavProvider -ne 'TVDB') { + $global:posterurl = GetTVDBMovieBackground + $global:IsFallback = $true + } if (!$global:posterurl) { if ($entry.PlexBackgroundUrl) { GetPlexArtwork -Type ' a Movie Background' -ArtUrl $Arturl -TempImage $backgroundImage @@ -8503,6 +8627,10 @@ else { $global:IsFallback = $true $global:tvdbalreadysearched = $true } + if ($global:FavProvider -eq 'TVDB' -and $global:TextlessPoster -ne 'true') { + $global:posterurl = GetFanartMoviePoster + $global:IsFallback = $true + } } if (!$global:TextlessPoster -eq 'true' -and $global:posterurl) { @@ -8799,15 +8927,41 @@ else { Write-Entry -Subtext "Took TMDB Fallback background because it is your Fav Provider" -Path $global:ScriptRoot\Logs\Scriptlog.log -Color Cyan -log Info $global:IsFallback = $true } - } - if ($global:TextlessPoster -eq 'true' -and $global:posterurl) { + if ($global:FavProvider -eq 'TVDB' -and !$global:posterurl) { + if ($entry.tmdbid) { + $global:posterurl = GetTMDBShowBackground + $global:IsFallback = $true + $global:FallbackText = 'True-Background' + } + if (!$global:posterurl) { + $global:posterurl = GetFanartShowBackground + $global:IsFallback = $true + $global:FallbackText = 'True-Background' + } + } } if ($global:OnlyTextless -and !$global:posterurl) { - $global:posterurl = GetFanartShowBackground + if ($global:FavProvider -eq 'TVDB') { + if ($entry.tmdbid) { + $global:posterurl = GetTMDBShowBackground + $global:IsFallback = $true + $global:FallbackText = 'True-Background' + } + if (!$global:posterurl) { + $global:posterurl = GetFanartShowBackground + $global:IsFallback = $true + $global:FallbackText = 'True-Background' + } + } + Else { + $global:posterurl = GetFanartShowBackground + } } if (!$global:posterurl) { - $global:posterurl = GetTVDBShowBackground - $global:IsFallback = $true + if ($global:FavProvider -ne 'TVDB') { + $global:posterurl = GetTVDBShowBackground + $global:IsFallback = $true + } $global:FallbackText = 'True-Background' if (!$global:posterurl) { if ($entry.PlexBackgroundUrl) { diff --git a/README.md b/README.md index a4a2d99..8431517 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,9 @@ Posterizarr is cross-platform ready, meaning it can run on Linux, [Docker (Alpin - `tmdb` (recommended) - `fanart` - `tvdb` - - `plex` (Not recommended) + - `plex` (Not recommended) + + [Search order in script](#Search-Order) - `PreferredLanguageOrder`: Specify language preferences. Default is `xx,en,de` (`xx` is Textless). Example configurations can be found in the config file. 2-digit language codes can be found here: [ISO 3166-1 Lang Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). - If you set it to `xx` you tell the script it should only search for textless, posters with text will be skipped. - `PreferredSeasonLanguageOrder`: Specify language preferences for seasons. Default is `xx,en,de` (`xx` is Textless). Example configurations can be found in the config file. 2-digit language codes can be found here: [ISO 3166-1 Lang Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). @@ -551,6 +553,134 @@ Following these steps will allow you to import the `Module1.bas` file containing > [!TIP] > - It was made using this Kometa [config](https://github.com/Kometa-Team/Community-Configs/tree/master/fscorrupt). +### Search Order + +
+🖼️Movie Poster & Background: +
+

+ + If `TMDB` is your fav Provider + + - TMDB + - FANART + - TVDB + - PLEX + - IMDB (Movies only) + + If `TVDB` is your fav Provider + + - TVDB + - TMDB + - FANART + - PLEX + - IMDB (Movies only) + + If `FANART` is your fav Provider + + - FANART + - TMDB + - TVDB + - PLEX + - IMDB (Movies only) +

+
+ +
+🖼️Show Poster & Background: +
+

+ + If `TMDB` is your fav Provider + + - TMDB + - FANART + - TVDB + - PLEX + + If `FANART` is your fav Provider + + - FANART + - TMDB + - TVDB + - PLEX + + If `TVDB` is your fav Provider + + - TVDB + - TMDB + - FANART + - PLEX +

+
+ +
+🖼️Show Season Poster: +
+

+ + If `TMDB` is your fav Provider + + - TMDB + - FANART + - TVDB + - PLEX + + If `FANART` is your fav Provider + + - FANART + - TMDB + - TVDB + - PLEX + + If `TVDB` is your fav Provider + + - TVDB + - TMDB + - FANART + - PLEX +

+
+ +
+🖼️Show TC with Background Poster: +
+

+ + If `TMDB` is your fav Provider + + - TMDB + - TVDB + - FANART + - PLEX + + Else + + - TVDB + - TMDB + - FANART + - PLEX +

+
+
+🖼️Show TC Poster: +
+

+ + If `TMDB` is your fav Provider + + - TMDB + - TVDB + - PLEX + + Else + + - TVDB + - TMDB + - PLEX +

+
+ ## Enjoy Feel free to customize the script further to meet your specific preferences or automation requirements. diff --git a/Release.txt b/Release.txt index 67a331c..513314c 100644 --- a/Release.txt +++ b/Release.txt @@ -1 +1 @@ -1.2.22 \ No newline at end of file +1.2.23 \ No newline at end of file