Skip to content

Commit 32fff9f

Browse files
committed
add: ability to specify tvdb pin
closes #172
1 parent 34b08b2 commit 32fff9f

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

Posterizarr.ps1

+16-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ param (
1212
[switch]$SyncEmby
1313
)
1414

15-
$CurrentScriptVersion = "1.9.9"
15+
$CurrentScriptVersion = "1.9.10"
1616
$global:HeaderWritten = $false
1717
$ProgressPreference = 'SilentlyContinue'
1818

@@ -6029,6 +6029,10 @@ Else {
60296029

60306030
# API Part
60316031
$global:tvdbapi = $config.ApiPart.tvdbapi
6032+
if ($global:tvdbapi -match '#'){
6033+
$global:tvdbpin = $global:tvdbapi.split('#')[1]
6034+
$global:tvdbapi = $global:tvdbapi.split('#')[0]
6035+
}
60326036
$global:tmdbtoken = $config.ApiPart.tmdbtoken
60336037
$FanartTvAPIKey = $config.ApiPart.FanartTvAPIKey
60346038
$PlexToken = $config.ApiPart.PlexToken
@@ -6736,10 +6740,17 @@ while (-not $success -and $retryCount -lt $maxRetries) {
67366740
try {
67376741
# tvdb token Header
67386742
$global:apiUrl = "https://api4.thetvdb.com/v4/login"
6739-
$global:requestBody = @{
6740-
apikey = $global:tvdbapi
6741-
} | ConvertTo-Json
6742-
6743+
if ($global:tvdbpin){
6744+
$global:requestBody = @{
6745+
apikey = $global:tvdbapi
6746+
pin = $global:tvdbpin
6747+
} | ConvertTo-Json
6748+
}
6749+
Else {
6750+
$global:requestBody = @{
6751+
apikey = $global:tvdbapi
6752+
} | ConvertTo-Json
6753+
}
67436754
# tvdb Header
67446755
$global:tvdbtokenheader = @{
67456756
'accept' = 'application/json'

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ Posterizarr is cross-platform ready, meaning it can run on Linux (also arm), [Do
104104
>- **Fanart Personal API Key:** [Obtain Fanart API Key](https://fanart.tv/get-an-api-key)
105105
>- **TVDB API Key:** [Obtain TVDB API Key](https://thetvdb.com/api-information/signup)
106106
- **Do not** use `"Legacy API Key"`, it only works with a Project Api Key.
107+
- If you are a TVDB subscriber, you can append your PIN to the end of your API key in the format `YourApiKey#YourPin`. (It is important to include a `#` between the API key and the PIN.)
107108
>- **ImageMagick:**
108109
- **Version 7.x is required** - The script handles downloading and using a portable version of ImageMagick for all platforms. **(You may need to run the Script as Admin on first run)**. If you prefer to reference your own installation or prefer to download and install it yourself, goto: [Download ImageMagick](https://imagemagick.org/script/download.php)
109110
>- **Powershell Version:** 5.x or higher (Docker Image uses v7.4.2).

Release.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.9.9
1+
1.9.10

0 commit comments

Comments
 (0)