-
-
Notifications
You must be signed in to change notification settings - Fork 23
TMDb Attributes
This is an optional YAML section for outlining how the Maker should interact with the public database service TMDb. TMDb is used for many things by the Maker, but notably the following:
- Automatically downloading source image files for use in the title cards
- Automatically downloading series logos for creating Show Summaries
- Automatically adding episode title translations to data files
tmdb:
api_key: abcdef0123456789
retry_count: 5
mimimum_resolution: 800x400
Name | YAML Attribute | Allowed Values | Default Value | Required |
---|---|---|---|---|
TMDb API Key | api_key |
A valid TMDb API Key | - | ✔️ |
TMDb Retry Count | retry_count |
A number | 3 |
❌ |
TMDb Minimum Resolution | minimum_resolution |
A resolution, specified as WIDTHxHEIGHT
|
0x0 |
❌ |
TMDb requires an API key to validate all API queries. Follow the procedure below to obtain your own unique key.
See the TMDb documentation here.
How many times a request can fail before permanently being 'blacklisted' and immediately skipped. For a variety of reasons, the Maker can fail to successfully find a given resource. This is most commonly one of the following:
- The requested episode not existing in TMDb
- The requested episode might exist in TMDb, but cannot be matched/found
- All source images for a given episode aren't of the minimum resolution
- There are no source images for a given episode
In order to limit unnecessary API queries to TMDb caused by repeatedly asking for a resource that does not exist, a specific episode is "blacklisted" after this specified number of operations. All failed operations are temporarily blacklisted for 24 hours before being tried again; however, if the same operation has failed retry_count
many times, it is permanently skipped.
NOTE: Despite offering a reliable and useful service, TMDb is free to all users (even through the API). As such, please be mindful in not abusing this service, and of course contribute to TMDb if possible.
Although TMDb has resolution and aspect-ratio restrictions on images users can contribute, the Maker permits enforcing specific resolution restrictions on images that are downloaded from TMDb if you choose to ignore 'low quality' images outright. This value should be specified as WIDTHxHEIGHT
(lowercase x
).
Beyond filtering out images below the specified minimum resolution, the Maker does implement some logic when choosing which image to download for a given entry (if there is more than one option). Source images are selected in the following manner:
- Filter out all images with widths less than the minimum width, or heights less than the minimum height
- Select the image(s) with the largest pixel count
- If multiple images have the same pixel count, select the image(s) with the highest user rating score
- If multiple images have the same pixel count and user rating, select the first image in this list (as returned by TMDb)
When summary creation is enabled, the Maker will attempt to download logos from TMDb if they don't already exist. Logos are selected in the following manner:
- Filter out all images whose TMDb-identified languages are not English, or a transparent filetype (
.png
or.svg
) - Select the first
.svg
image if one exists - If no
.svg
image exist, select the image with the largest pixel count - If multiple images have the same pixel count, select the first image in this list (as returned by TMDb)
NOTE:
.svg
images require ImageMagick conversion to.png