Can we query animelist(s) within groovy script using filebot methods?
Posted: 09 Sep 2020, 15:22
Can we query the Animelists within a groovy script directly?
Non-strict looks to frequently be required to match most anime *i* am downloading, which is fine except there is a decent number of times where the match is not even the correct series AND the "correct" series name is part of the filename.
So I'd like to write a script that tries to guess the "correct" series name, and one of the data points I'd like to reference is the Anime List (Scud-Lee's specifically).
If filebot provides a method for directly interfacing/searching the list then I'd use that (no need to recreate the wheel unless I need too), if not then I'll have to do that myself
I've found the TheTVDB.search(query, locale) and AniDB.search(query, locale) methods while searching the filebot scripts (couldn't locate these aliases in the docs, so hopefully they are not undocumented/unsupported methods).
Here are two examples of a series which frequently when using non-strict has a good chance of not matching the series at all (and rarely matches without non-strict)
And the name (Maou Gakuin no Futekigousha) is an alias/shortname in both AniDB and TheTVDB ...
And while it's ONE of the series fetched, it's common for a series mismatch ..
So I want to try automating the renaming specifically for Anime, where I restrict the episode data to a single series in hopes of matching at least the right series (wrong season happens, but that's less important then at least matching the right series)..
While I can get a "series name" from the file, and I can also try searching TheTVDB/AniDB for matches, I'd like to be able to query the AnimeList for cross references, aliases etc so I can increase the accuracy of the query I send to the renamer ..
Thanks.
Non-strict looks to frequently be required to match most anime *i* am downloading, which is fine except there is a decent number of times where the match is not even the correct series AND the "correct" series name is part of the filename.
So I'd like to write a script that tries to guess the "correct" series name, and one of the data points I'd like to reference is the Anime List (Scud-Lee's specifically).
If filebot provides a method for directly interfacing/searching the list then I'd use that (no need to recreate the wheel unless I need too), if not then I'll have to do that myself

I've found the TheTVDB.search(query, locale) and AniDB.search(query, locale) methods while searching the filebot scripts (couldn't locate these aliases in the docs, so hopefully they are not undocumented/unsupported methods).
Here are two examples of a series which frequently when using non-strict has a good chance of not matching the series at all (and rarely matches without non-strict)
Code: Select all
2020-07-25T19:53:51Z: [MOVE] from [Z:\1-InboundRaw.PreSort\anime\[Erai-raws] Maou Gakuin no Futekigousha - 04 [720p][Multiple Subtitle].mkv] to [Z:\1-InitialSort\2020_rerelease\Kyo Kara Maoh! - God () Save Our King! [anidb-1677]\[Erai-raws] Maou Gakuin no Futekigousha - 04 [720p][Multiple Subtitle].mkv]
2020-07-25T19:53:51Z: [MOVE] from [Z:\1-InboundRaw.PreSort\anime\[HorribleSubs] Maou Gakuin no Futekigousha - 04 [720p].mkv] to [Z:\1-InitialSort\2019\summer\Demon Lord, Retry! [anidb-14391]\[HorribleSubs] Maou Gakuin no Futekigousha - 04 [720p].mkv]
And while it's ONE of the series fetched, it's common for a series mismatch ..
Code: Select all
2020-07-25T19:53:51Z: Auto-detected query: [Maou, maou gakuin no futekigousha]
2020-07-25T19:53:51Z: Fetching episode data for [Kyou kara Maou!]
2020-07-25T19:53:51Z: Fetching episode data for [Maou Dante]
2020-07-25T19:53:51Z: Fetching episode data for [Maou-sama, Retry!]
2020-07-25T19:53:51Z: Fetching episode data for [Maou-jou de Oyasumi]
2020-07-25T19:53:51Z: Fetching episode data for [Maou Gakuin no Futekigousha: Shijou Saikyou no Maou no Shiso, Tensei Shite Shison-tachi no Gakkou e Kayou]
While I can get a "series name" from the file, and I can also try searching TheTVDB/AniDB for matches, I'd like to be able to query the AnimeList for cross references, aliases etc so I can increase the accuracy of the query I send to the renamer ..
Thanks.