feat(providers): fill the western IDs of an AniList match from the anime-lists ID map

This commit is contained in:
imSp4rky
2026-11-29 10:47:22 -07:00
parent efd8ca65c7
commit 6758d9e4fa
13 changed files with 370 additions and 19 deletions
+1 -1
View File
@@ -179,7 +179,7 @@ Keep only certain track types, or skip certain track types.
!!! note "One ID at a time"
You cannot combine `--tmdb`, `--imdb` and `--tvdb`. Give one and unshackle finds the
others from it, and writes all three to the tags. `--anilist` is outside that rule and pairs
with one of them, which is how you attach a western ID to an anime title.
with one of them, which is how you set the western ID of an anime title yourself.
An ID with no metadata provider that can find it, such as `--tmdb` with no `tmdb_api_key`,
fails before the download starts. `--anilist` needs no API key, so it never fails this check.
+15 -4
View File
@@ -1101,7 +1101,7 @@ operates when you set its config key:
| OMDb | `omdb_api_key` | yes | yes, as an English name such as `Korean` | IMDb |
| IMDb | *(no config key needed)* | yes | yes, alpha-2 such as `ko` | IMDb |
| SIMKL | `simkl_client_id` | yes | no, it publishes a country and no language | IMDb, TMDB, TVDB |
| AniList | *(no config key needed)* | yes | yes, worked out from the country of origin, such as `ja` | AniList |
| AniList | *(no config key needed)* | yes | yes, worked out from the country of origin, such as `ja` | AniList, and TMDB, IMDb and TVDB from an ID map |
Whatever the tag looks like, unshackle normalises it before use, so `ko`, `kor` and `Korean`
all end up as the same language.
@@ -1128,14 +1128,25 @@ Each ID goes to the providers that read that kind of ID, in
out of the box, and an OMDb API key only matters when IMDb has no answer.
- `--tvdb` reads TVDB. It needs `tvdb_api_key`.
- `--anilist` reads AniList, which needs no API key. It supplies the title, the year and the
original language, and writes an AniList tag. It knows no TMDB, IMDB or TVDB ID, so pair it
with `--tmdb`, `--imdb` or `--tvdb` when you want those tags as well.
original language, and writes an AniList tag. AniList knows no TMDB, IMDB or TVDB ID, so
unshackle takes them from the [anime-lists](https://github.com/Fribb/anime-lists) ID map.
Pair it with `--tmdb`, `--imdb` or `--tvdb` when the map has no entry for the title, or
a wrong one. An ID that you give always wins over the map.
Give **one** of `--tmdb`, `--imdb` and `--tvdb`. You cannot combine them, because one ID
does the job on its own: unshackle finds the other two from it and writes all three to the
tags.
Passing two is an error rather than a silent choice between them. `--anilist` is the exception
and still pairs with one of the three, which is how you tag an anime title with a western ID.
and still pairs with one of the three, which is how you set the western ID of an anime title
yourself.
!!! note "The AniList ID map"
An AniList match, from a search or from `--anilist`, has no TMDB, IMDb or TVDB ID. unshackle
then looks the AniList ID up in the anime-lists ID map. It downloads the map (about 7 MB) the
first time that it needs it, and keeps it in the cache for a week. When the match already has a
western ID that differs from the map, unshackle does not use the map. A movie takes only a TMDB movie ID, and a series takes the
IDs of the whole series, also for a later season. When the map cannot download, the match
keeps only its AniList ID.
The ID you give must have a metadata provider that can find it, so unshackle makes sure of
that before it downloads anything. `--tmdb` without `tmdb_api_key`, or an ID whose metadata