[DEPRECATED] support for XEM?

All your suggestions, requests and ideas for future development
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

IDK. I don't seem to need detailed statistics that that. However, the FileBot Cache API is build on top of ehcache 2.10.6 so you could use those APIs directly if you need fine-grained caching.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

e.g. Using --mapper for matching and reverse-mapping via --format and {order} binding:

Code: Select all

filebot -list --db AniDB --q "Monogatari Series: Second Season" --order Absolute --mapper AnimeLists.TheTVDB --format "{episode} || {order.absolute.episode}"

Code: Select all

Monogatari Series Second Season - 3x01 - Tsubasa Tiger, Part 1 || Monogatari Series Second Season - 01 - Tsubasa Tiger, Part 1
Monogatari Series Second Season - 3x02 - Tsubasa Tiger, Part 2 || Monogatari Series Second Season - 02 - Tsubasa Tiger, Part 2
Monogatari Series Second Season - 3x03 - Tsubasa Tiger, Part 3 || Monogatari Series Second Season - 03 - Tsubasa Tiger, Part 3
Monogatari Series Second Season - 3x04 - Tsubasa Tiger, Part 4 || Monogatari Series Second Season - 04 - Tsubasa Tiger, Part 4
Monogatari Series Second Season - 3x05 - Tsubasa Tiger, Part 5 || Monogatari Series Second Season - 05 - Tsubasa Tiger, Part 5
Monogatari Series Second Season - Special 7 - Summary 1 || Monogatari Series Second Season - 06 - Summary 1
Monogatari Series Second Season - 3x06 - Mayoi Jiangshi, Part 1 || Monogatari Series Second Season - 07 - Mayoi Jiangshi, Part 1
Monogatari Series Second Season - 3x07 - Mayoi Jiangshi, Part 2 || Monogatari Series Second Season - 08 - Mayoi Jiangshi, Part 2
Monogatari Series Second Season - 3x08 - Mayoi Jiangshi, Part 3 || Monogatari Series Second Season - 09 - Mayoi Jiangshi, Part 3
Monogatari Series Second Season - 3x09 - Mayoi Jiangshi, Part 4 || Monogatari Series Second Season - 10 - Mayoi Jiangshi, Part 4
Monogatari Series Second Season - Special 8 - Summary 2 || Monogatari Series Second Season - 11 - Summary 2
Monogatari Series Second Season - 3x10 - Nadeko Medusa, Part 1 || Monogatari Series Second Season - 12 - Nadeko Medusa, Part 1
Monogatari Series Second Season - 3x11 - Nadeko Medusa, Part 2 || Monogatari Series Second Season - 13 - Nadeko Medusa, Part 2
Monogatari Series Second Season - 3x12 - Nadeko Medusa, Part 3 || Monogatari Series Second Season - 14 - Nadeko Medusa, Part 3
Monogatari Series Second Season - 3x13 - Nadeko Medusa, Part 4 || Monogatari Series Second Season - 15 - Nadeko Medusa, Part 4
Monogatari Series Second Season - Special 9 - Summary 3 || Monogatari Series Second Season - 16 - Summary 3
Monogatari Series Second Season - 3x14 - Shinobu Time, Part 1 || Monogatari Series Second Season - 17 - Shinobu Time, Part 1
Monogatari Series Second Season - 3x15 - Shinobu Time, Part 2 || Monogatari Series Second Season - 18 - Shinobu Time, Part 2
Monogatari Series Second Season - 3x16 - Shinobu Time, Part 3 || Monogatari Series Second Season - 19 - Shinobu Time, Part 3
Monogatari Series Second Season - 3x17 - Shinobu Time, Part 4 || Monogatari Series Second Season - 20 - Shinobu Time, Part 4
Monogatari Series Second Season - 3x18 - Hitagi End, Part 1 || Monogatari Series Second Season - 21 - Hitagi End, Part 1
Monogatari Series Second Season - 3x19 - Hitagi End, Part 2 || Monogatari Series Second Season - 22 - Hitagi End, Part 2
Monogatari Series Second Season - 3x20 - Hitagi End, Part 3 || Monogatari Series Second Season - 23 - Hitagi End, Part 3
Monogatari Series Second Season - 3x21 - Hitagi End, Part 4 || Monogatari Series Second Season - 24 - Hitagi End, Part 4
Monogatari Series Second Season - 3x22 - Hitagi End, Part 5 || Monogatari Series Second Season - 25 - Hitagi End, Part 5
Monogatari Series Second Season - 3x23 - Hitagi End, Part 6 || Monogatari Series Second Season - 26 - Hitagi End, Part 6
Monogatari Series Second Season - Special 1 - Koyomi History || Monogatari Series Second Season - Special 1 - Koyomi History
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

e.g. same thing, but in reverse:

Code: Select all

filebot -list --db TheTVDB --q "Monogatari" --order Airdate --mapper AnimeLists.AniDB --format "{episode} || {seasonize.episode}" --filter "s == 3" --log OFF

Code: Select all

Monogatari Series: Second Season - 01 - Tsubasa Tiger - Part 1 || Monogatari - 3x01 - Tsubasa Tiger - Part 1
Monogatari Series: Second Season - 02 - Tsubasa Tiger - Part 2 || Monogatari - 3x02 - Tsubasa Tiger - Part 2
Monogatari Series: Second Season - 03 - Tsubasa Tiger - Part 3 || Monogatari - 3x03 - Tsubasa Tiger - Part 3
Monogatari Series: Second Season - 04 - Tsubasa Tiger - Part 4 || Monogatari - 3x04 - Tsubasa Tiger - Part 4
Monogatari Series: Second Season - 05 - Tsubasa Tiger - Part 5 || Monogatari - 3x05 - Tsubasa Tiger - Part 5
Monogatari Series: Second Season - 07 - Mayoi Jiangshi - Part 1 || Monogatari - 3x06 - Mayoi Jiangshi - Part 1
Monogatari Series: Second Season - 08 - Mayoi Jiangshi - Part 2 || Monogatari - 3x07 - Mayoi Jiangshi - Part 2
Monogatari Series: Second Season - 09 - Mayoi Jiangshi - Part 3 || Monogatari - 3x08 - Mayoi Jiangshi - Part 3
Monogatari Series: Second Season - 10 - Mayoi Jiangshi - Part 4 || Monogatari - 3x09 - Mayoi Jiangshi - Part 4
Monogatari Series: Second Season - 12 - Nadeko Medusa - Part 1 || Monogatari - 3x10 - Nadeko Medusa - Part 1
Monogatari Series: Second Season - 13 - Nadeko Medusa - Part 2 || Monogatari - 3x11 - Nadeko Medusa - Part 2
Monogatari Series: Second Season - 14 - Nadeko Medusa - Part 3 || Monogatari - 3x12 - Nadeko Medusa - Part 3
Monogatari Series: Second Season - 15 - Nadeko Medusa - Part 4 || Monogatari - 3x13 - Nadeko Medusa - Part 4
Monogatari Series: Second Season - 17 - Shinobu Time - Part 1 || Monogatari - 3x14 - Shinobu Time - Part 1
Monogatari Series: Second Season - 18 - Shinobu Time - Part 2 || Monogatari - 3x15 - Shinobu Time - Part 2
Monogatari Series: Second Season - 19 - Shinobu Time - Part 3 || Monogatari - 3x16 - Shinobu Time - Part 3
Monogatari Series: Second Season - 20 - Shinobu Time - Part 4 || Monogatari - 3x17 - Shinobu Time - Part 4
Monogatari Series: Second Season - 21 - Hitagi End - Part 1 || Monogatari - 3x18 - Hitagi End - Part 1
Monogatari Series: Second Season - 22 - Hitagi End - Part 2 || Monogatari - 3x19 - Hitagi End - Part 2
Monogatari Series: Second Season - 23 - Hitagi End - Part 3 || Monogatari - 3x20 - Hitagi End - Part 3
Monogatari Series: Second Season - 24 - Hitagi End - Part 4 || Monogatari - 3x21 - Hitagi End - Part 4
Monogatari Series: Second Season - 25 - Hitagi End - Part 5 || Monogatari - 3x22 - Hitagi End - Part 5
Monogatari Series: Second Season - 26 - Hitagi End - Part 6 || Monogatari - 3x23 - Hitagi End - Part 6
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

:idea: Playing around with it. Does it make sense to keep the mapped value for formatting? Or would it make more sense to use the mapped value only for matching, but always unmap to the original Episode values before formatting?
:idea: Please read the FAQ and How to Request Help.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: support for XEM?

Post by devster »

Sorry, I don't understand to which mapped value you're referring?

However, in your two previous posts I would be surprised by the results.
In the second one I would expect AniDB title to be Owarimonogatari Second Season, not Monogatari, and in the first one I would expect season title to be Monogatari, in both cases I see the flow going from DB to Mapper to Destination with final bindings referring only to the last step.

--db AniDB --mapper Xem.TVDB >> from AniDB information (for matching) to Xem to TheTVDB (final output Monogatari with season/episodes).
--db TheTVDB --mapper Xem.AniDB >> from TheTVDB to Xem to AniDB (final output Owarimonogatari S2 and absolute numbers).

"XEM" binding also seems to already include information about the pre-matching values.
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

I've published a new release with better logging and default toString representation of mapped Episode objects.

-list calls will print mapping information and original information by default.

-rename will use the mapping information for matching but then just pass on the original information for use in formatting, i.e. after renaming, numbers will match your chosen database.



:idea: Note that the examples above use AnimeLists and not XEM. Looks good to me according to the mapping information AnimeLists provides.
:idea: Please read the FAQ and How to Request Help.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: support for XEM?

Post by devster »

Sorry about AnimeList vs XEM, I'd expect similar info, also the binding seems to be called XEM in the BETA (not sure if latest).
I wasn't questioning the information, I was simply saying my expectation was different.
I would consider --db as source, --mapper as intermediary.destination, your examples seem to do the opposite, --db is the destination, --mapper is intermediary.source.
I'd expect --db AniDB {episode} to correspond to Owarimonogatari S2 - absolute episode
and --db TheTVDB {episode} to correspond to Monogatary - S00E00 episodes.
That's all. If the decision is to use them as you demonstrate I'll adapt.
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

It's all work in progress. I'll post some actual usage examples later and see if they work as one would expect.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

Here's what I get with r6504. Comments appreciated.

Code: Select all

$ filebot --log INFO -list --db TheTVDB --q Monogatari --filter s==3 --mapper XEM.AniDB
Monogatari Series Second Season - 01 [Monogatari - 3x01 - Tsubasa Tiger - Part 1]
Monogatari Series Second Season - 02 [Monogatari - 3x02 - Tsubasa Tiger - Part 2]
...

Code: Select all

$ filebot --log INFO -list --db AniDB --q Monogatari --filter s==3 --mapper XEM.TheTVDB
Monogatari - 3x01 [Monogatari Series Second Season - 01 - Tsubasa Tiger, Part 1]
Monogatari - 3x02 [Monogatari Series Second Season - 02 - Tsubasa Tiger, Part 2]
...
:idea: --db AniDB --filter s==3 only works because FileBot is implicitly using AnimeList when the season value {s} is requested, for Anime Episode objects for which {s} would typically be undefined.

Code: Select all

$ filebot --log INFO --action TEST -rename *.mkv -non-strict --db TheTVDB --mapper XEM.AniDB
...
[TEST] from [Monogatari Series Second Season - 22.mkv] to [Monogatari - 3x22 - Hitagi End - Part 5.mkv]
[TEST] from [Monogatari Series Second Season - 23.mkv] to [Monogatari - 3x23 - Hitagi End - Part 6.mkv]


:!: Note that XEM and AnimeLists seem to have different mappings.


Code: Select all

$ filebot --log INFO -list --db AniDB --q "Monogatari Series Second Season" --mapper AnimeList.TheTVDB
...
Monogatari Series Second Season - 3x05 [Monogatari Series Second Season - 05 - Tsubasa Tiger, Part 5]
Monogatari Series Second Season - Special 7 [Monogatari Series Second Season - 06 - Summary 1]
Monogatari Series Second Season - 3x06 [Monogatari Series Second Season - 07 - Mayoi Jiangshi, Part 1]
Monogatari Series Second Season - 3x07 [Monogatari Series Second Season - 08 - Mayoi Jiangshi, Part 2]
Monogatari Series Second Season - 3x08 [Monogatari Series Second Season - 09 - Mayoi Jiangshi, Part 3]
Monogatari Series Second Season - 3x09 [Monogatari Series Second Season - 10 - Mayoi Jiangshi, Part 4]
Monogatari Series Second Season - Special 8 [Monogatari Series Second Season - 11 - Summary 2]
Monogatari Series Second Season - 3x10 [Monogatari Series Second Season - 12 - Nadeko Medusa, Part 1]
...
Monogatari Series Second Season - 3x18 [Monogatari Series Second Season - 21 - Hitagi End, Part 1]
Monogatari Series Second Season - 3x19 [Monogatari Series Second Season - 22 - Hitagi End, Part 2]
Monogatari Series Second Season - 3x20 [Monogatari Series Second Season - 23 - Hitagi End, Part 3]
...
:idea: Note that that the series name is not mapped to TheTVDB in this example, because AnimeList data only has the AniDB series name, but not the TheTVDB series name, so the name is mapped as is (as to avoid additional TheTVDB network requests to look up the name by ID).

Code: Select all

$ filebot --log INFO --action TEST -rename *.mkv -non-strict --db TheTVDB --mapper AnimeList.AniDB
[TEST] from [Monogatari Series Second Season - 21.mkv] to [Monogatari - 3x18 - Hitagi End - Part 1.mkv]
[TEST] from [Monogatari Series Second Season - 22.mkv] to [Monogatari - 3x19 - Hitagi End - Part 2.mkv]
[TEST] from [Monogatari Series Second Season - 23.mkv] to [Monogatari - 3x20 - Hitagi End - Part 3.mkv]
:idea: Please read the FAQ and How to Request Help.
crawfs
Posts: 24
Joined: 01 Feb 2019, 09:26

Re: support for XEM?

Post by crawfs »

Based on your exam]ple AnimeList seems a lot more accurate than TVDB and xem is similarly troublesome from my example.

However I can't get AnimeList working for me on the latest build:

Code: Select all

filebot.exe -version
FileBot 4.8.6 (r6492) / OpenJDK Runtime Environment 12.0.1 / Windows 10 10.0 (amd64)
And when I run:

Code: Select all

filebot.exe --log INFO --action TEST -rename *.mkv -non-strict --db TheTVDB --mapper AnimeList.AniDB
I get the following:

Code: Select all

Exclude [Monogatari Series: Second Season - 1x01 - Tsubasa Tiger - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x02 - Tsubasa Tiger - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x03 - Tsubasa Tiger - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x04 - Tsubasa Tiger - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x05 - Tsubasa Tiger - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x06 - Mayoi Jiangshi - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x07 - Mayoi Jiangshi - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x08 - Mayoi Jiangshi - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x09 - Mayoi Jiangshi - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x10 - Nadeko Medusa - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x11 - Nadeko Medusa - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x12 - Nadeko Medusa - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x13 - Nadeko Medusa - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x14 - Shinobu Time - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x15 - Shinobu Time - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x16 - Shinobu Time - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x17 - Shinobu Time - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x18 - Hitagi End - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x19 - Hitagi End - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x20 - Hitagi End - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x21 - Hitagi End - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x22 - Hitagi End - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x23 - Hitagi End - Part 6] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x01 - Hitagi Crab - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x02 - Hitagi Crab - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x03 - Mayoi Snail - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x04 - Mayoi Snail - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x05 - Mayoi Snail - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x06 - Suruga Monkey - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x07 - Suruga Monkey - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x08 - Suruga Monkey - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x09 - Nadeko Snake - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x10 - Nadeko Snake - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x11 - Tsubasa Cat - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x12 - Tsubasa Cat - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x13 - Tsubasa Cat - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x14 - Tsubasa Cat - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x15 - Tsubasa Cat - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x01 - Karen Bee - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x02 - Karen Bee - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x03 - Karen Bee - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x04 - Karen Bee - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x05 - Karen Bee - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x06 - Karen Bee - Part 6] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x07 - Karen Bee - Part 7] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x08 - Tsukihi Phoenix - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x09 - Tsukihi Phoenix - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x10 - Tsukihi Phoenix - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x11 - Tsukihi Phoenix - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x01 - Tsubasa Tiger - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x02 - Tsubasa Tiger - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x03 - Tsubasa Tiger - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x04 - Tsubasa Tiger - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x05 - Tsubasa Tiger - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x06 - Mayoi Jiangshi - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x07 - Mayoi Jiangshi - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x08 - Mayoi Jiangshi - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x09 - Mayoi Jiangshi - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x10 - Nadeko Medusa - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x11 - Nadeko Medusa - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x12 - Nadeko Medusa - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x13 - Nadeko Medusa - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x14 - Shinobu Time - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x15 - Shinobu Time - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x16 - Shinobu Time - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x17 - Shinobu Time - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x18 - Hitagi End - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x19 - Hitagi End - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x20 - Hitagi End - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x21 - Hitagi End - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x22 - Hitagi End - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x23 - Hitagi End - Part 6] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x01 - Ougi Formula - Parts 1 & 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x02 - Sodachi Riddle - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x03 - Sodachi Riddle - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x04 - Sodachi Lost - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x05 - Sodachi Lost - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x06 - Sodachi Lost - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x07 - Shinobu Mail - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x08 - Shinobu Mail - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x09 - Shinobu Mail - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x10 - Shinobu Mail - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x11 - Shinobu Mail - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x12 - Shinobu Mail - Part 6] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 5x01 - Mayoi Hell - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 5x02 - Mayoi Hell - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 5x03 - Hitagi Rendezvous - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 5x04 - Hitagi Rendezvous - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 5x05 - Ougi Dark - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 5x06 - Ougi Dark - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 5x07 - Ougi Dark - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 1 - Episode 5.5 (Recap)] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 2 - Kizumonogatari I: Iron Blood Arc] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 3 - Tsubasa Family - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 4 - Tsubasa Family - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 5 - Tsubasa Family - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 6 - Tsubasa Family - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 7 - Summary I] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 8 - Summary II] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 10 - Suruga Devil - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 9 - Summary III] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 11 - Suruga Devil - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 12 - Suruga Devil - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 13 - Suruga Devil - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 14 - Suruga Devil - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 15 - Yotsugi Doll - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 16 - Yotsugi Doll - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 17 - Yotsugi Doll - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 18 - Yotsugi Doll - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 19 - Kizumonogatari II: Passionate Blood Arc] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 20 - Kizumonogatari III: Cold Blood Arc] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 21 - Koyomi Stone] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 22 - Koyomi Flower] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 23 - Koyomi Sand] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 24 - Koyomi Water] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 25 - Koyomi Wind] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 26 - Koyomi Tree] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 27 - Koyomi Tea] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 28 - Koyomi Mountain] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 29 - Koyomi Torus] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 30 - Koyomi Seed] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 31 - Koyomi Nothing] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 32 - Koyomi Dead] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 33 - Koyomi Reverse - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 34 - Koyomi Reverse - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 35 - Koyomi Reverse - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 36 - Koyomi Reverse - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 37 - Koyomi Reverse - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 38 - Koyomi Reverse - Part 6] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

r6504 or higher is required:
viewtopic.php?f=7&t=1609

:arrow: I'm uploading new release builds into the BETA directory as well. Please check back an hour later.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

FileBot r6509 now allows the --mapper to map 1..* episode options, so you can increase the chance that the perfect match is among them, but might also increase ambiguity, depending on the specific circumstances:

Code: Select all

$ filebot --log INFO --action TEST -rename *.mkv -non-strict --db TheTVDB --mapper "[episode, AnimeList.AniDB]"
[TEST] from [Monogatari - 3x19.mkv] to [Monogatari - 3x19 - Hitagi End - Part 2.mkv]
[TEST] from [Monogatari Series Second Season - 23.mkv] to [Monogatari - 3x20 - Hitagi End - Part 3.mkv]
:idea: Please read the FAQ and How to Request Help.
crawfs
Posts: 24
Joined: 01 Feb 2019, 09:26

Re: support for XEM?

Post by crawfs »

Not sure I understand what that latest change is doing.
crawfs
Posts: 24
Joined: 01 Feb 2019, 09:26

Re: support for XEM?

Post by crawfs »

The mapping has issues with shows that have a separate aniDB entry for each season but the file name itself is in absolute order, this was when I was testing it with amc

Code: Select all

filebot.exe --log INFO --action TEST --output "E:\FilebotTest"  -script fn:amc -non-strict "E:\Downloads" --def animeFormat="{n}\Season {s.pad(2)}\{n} - {s00e00}" --map
per AnimeList.AniDB

Code: Select all

[TEST] from [E:\Downloads\[anime4life.] Kuroko's Basketball 51-75 Complete [Season 3] (BD1080p AC3 8bit) [x264_AVC] English Subbed\Kuroko's Basketball 75 Again and Again (BD1080p AC3 8bit).mkv] to [E:\FilebotTest\TV Shows\Kuroko's Basketball\Season 02\Kuroko's Basketball - S02E24 - Enough.mkv]
 [TEST] from [E:\Downloads\[anime4life.] Kuroko's Basketball 51-75 Complete [Season 3] (BD1080p AC3 8bit) [x264_AVC] English Subbed\Kuroko's Basketball 72 Let Me Warn You (BD1080p AC3 8bit).mkv] to [E:\FilebotTest\TV Shows\Kuroko's Basketball\Season 03\Kuroko's Basketball - S03E03 - Don't You Get in My Way.mkv]
 [TEST] from [E:\Downloads\[DameDesuYo] Shingeki no Kyojin (Season 3 Part 2) - 56v0 (1920x1080 10bit AAC) [00E4BAEE].mkv] to [E:\FilebotTest\TV Shows\Attack on Titan\Specials\Attack on Titan - S00E04 - Chibi Theatre - Fly, Cadets, Fly! ~ Day 3 & 4.mkv]
[TEST] from [E:\Downloads\[DameDesuYo] Shingeki no Kyojin (Season 3 Part 2) - 56v0 (1920x1080 10bit AAC) [564AB91D].mkv] to [E:\FilebotTest\TV Shows\Attack on Titan\Season 03\Attack on Titan - S03E02 - Pain.mkv]
[TEST] from [E:\Downloads\[BlurayDesuYo] Shingeki no Kyojin - Season 2 (BD 1920x1080 10bit FLAC)\[BlurayDesuYo] Shingeki no Kyojin (Season 2) - 35 (BD 1920x1080 10bit FLAC) [47B4753C].mkv] to [E:\FilebotTest\TV Shows\Attack on Titan\Season 02\Attack on Titan - S02E03 - Southwestward.mkv]
I didn't test the above filenames without AMC but figured it was worth mentioning, oh and I provided some links to aniDB pages where shows are split by season:

https://anidb.net/perl-bin/animedb.pl?s ... &aid=10944
https://anidb.net/perl-bin/animedb.pl?s ... &aid=14444
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

If the files already use TheTVDB Absolute Order, then it'll work out of the box:

Code: Select all

$ filebot --log INFO --action TEST -rename -r *.mkv -non-strict --db TheTVDB --format "{n} - {sxe} [{absolute}]"
[TEST] from [Kuroko's Basketball 72 Let Me Warn You (BD1080p AC3 8bit).mkv] to [Kuroko's Basketball - 3x22 [72].mkv]
[TEST] from [Kuroko's Basketball 75 Again and Again (BD1080p AC3 8bit).mkv] to [Kuroko's Basketball - 3x25 [75].mkv]

BUG: The other way around indeed doesn't work well, as it seems

Code: Select all

filebot -list --q "Kuroko's Basketball" --db AniDB --mapper XEM.TheTVDB -non-strict
DEBUG: I guess I'll need to do some kind of normalization to match between AniDB and TheTVDB series names when using XEM:

Code: Select all

Kuroko's Basketball 3
Kuroko`s Basketball 3

:idea: --db AniDB --mapper AnimeList.TheTVDB works correctly because shows are mapped by numeric ID, but since AnimeList doesn't have absolute number mapping information, we will only have SxE information, and not absolute information, so it's useless in this particular example because we need absolute numbers for matching these files correctly.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

FileBot r6528 and above also support multi-mapping to give the FileBot matcher multiple options to choose from, increasing the likelihood that one of those numbers match exactly (but also increasing the chance of mismatches since there's more options, especially multiple options with overlapping numbers, i.e. ambiguous options)

Code: Select all

--db AniDB --mapper "[episode, AnimeList.TheTVDB, XEM.TheTVDB]"
:idea: Please read the FAQ and How to Request Help.
OutrageousGem
Posts: 11
Joined: 12 Apr 2019, 06:20

Re: support for XEM?

Post by OutrageousGem »

I still do not really get how the command is supposed to be used. Is --db now used for the initial matching Database or the final Database to rename against?
For example if I want to rename "Fairy Tail (2018) - 02 - Because of Love.mkv" (AniDB) to "Fairy Tail - S08E02 -Because of Love.mkv" (TheTVDB) would I use

Code: Select all

/usr/bin/filebot -rename --action test --db TheTVDB -non-strict --mapper AnimeList.AniDB --output /library/anime --format "{plex[1]/plex[2]/plex[3]}" /download
or

Code: Select all

/usr/bin/filebot -rename --action test --db AniDB -non-strict --mapper AnimeList.TheTVDB --output /library/anime --format "{plex[1]/plex[2]/plex[3]}" /download


?
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

This particular example works out of the box:

Code: Select all

$ filebot -rename *.mkv --db TheTVDB -non-strict --action TEST
Rename episodes using [TheTVDB] with [Airdate Order]
Auto-detected query: [Fairy Tail]
Fetching episode data for [Fairy Tail]
[TEST] from [Fairy Tail (2018) - 02 - Because of Love.mkv] to [Fairy Tail - 8x02 - Because of Love.mkv]

Generally speaking, if you want to rename with TheTVDB but match with AnimeLists mapping information, then this should work:

Code: Select all

--db TheTVDB --mapper AnimeList.AniDB
:idea: Please read the FAQ and How to Request Help.
OutrageousGem
Posts: 11
Joined: 12 Apr 2019, 06:20

Re: support for XEM?

Post by OutrageousGem »

Weird enough it does work out of the box. But it does NOT work if I add

Code: Select all

--mapper AnimeList.AniDB
You can see the error at:
https://pastebin.com/rr80xwQb
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

Looks like it can't find a mapping:

Code: Select all

Exclude [Fairy Tail - 8x02 - Because of Love] due to map failure: javax.script.ScriptException: net.filebot.format.BindingException: Binding "AniDB": null
I'll look into it.


EDIT:

Fixed with FileBot r6529:

Code: Select all

$ filebot -rename *.mkv --db TheTVDB --mapper AnimeList.AniDB --action TEST | grep "Because of Love"
Map [Fairy Tail - 8x02 - Because of Love] to [Fairy Tail (2018) - 02]
Reverse Map [Fairy Tail (2018) - 02] to [Fairy Tail - 8x02 - Because of Love]
[TEST] from [Fairy Tail (2018) - 02 - Because of Love.mkv] to [Fairy Tail - 8x02 - Because of Love.mkv]
:idea: Please read the FAQ and How to Request Help.
OutrageousGem
Posts: 11
Joined: 12 Apr 2019, 06:20

Re: support for XEM?

Post by OutrageousGem »

That was quick! I tried it with r6530 and it works like a charm.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: support for XEM?

Post by devster »

Not sure if intentional or feasible, but binding for {sc} seems to be undefined.
I tried with the following:

Code: Select all

FileBot 4.8.6 (r6531)

$ filebot -list --q 'neon genesis evangelion' --db AniDB --format '{s00e00} {absolute} {sc} {special}'
I expected sc to be 1, the season count for the show.
I only work in black and sometimes very, very dark grey. (Batman)
OutrageousGem
Posts: 11
Joined: 12 Apr 2019, 06:20

Re: support for XEM?

Post by OutrageousGem »

I think AniDB does not have the concept of seasons as each season is its own show. So sc stays undefined.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: support for XEM?

Post by devster »

It doesn’t, but it was my understanding that new versions made the match implicitly, via AnimeList.
See viewtopic.php?f=6&t=6037&start=50#p44526
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

{sc} and {sy} are based on {episodelist} so it doesn't work if --db AniDB is being used.

:idea: Implicit conversion is only implemented for {s} and {sxe} and {s00e00} at this point.

:arrow: If {sc} and {sy} is desired, then I recommend using --db TheTVDB, optionally with --mapper AnimeList.AniDB to help with matching AniDB-named files.


EDIT:

Fixed {sy} to work for AniDB data. No mapper involved. Just the years from the first to the last episode of the given AniDB series.
:idea: Please read the FAQ and How to Request Help.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: support for XEM?

Post by devster »

rednoah wrote: 06 Jul 2019, 02:37 {sc} and {sy} are based on {episodelist} so it doesn't work if --db AniDB is being used.
For the sake of argument, why is {episodelist} undefined for AniDB?
rednoah wrote: 06 Jul 2019, 02:37 :idea: Implicit conversion is only implemented for {s} and {sxe} and {s00e00} at this point.
Use case would be the following:

Code: Select all

	{
		Integer count = any{ sc }{ 0 }
		if (episode.special) {
			"S$special"
		} else if (count > 1) {
			s00e00
		} else {
			"EP" + absolute
		}
	}
As this is is not foreseen, how would I use the amc.groovy script to have a single season folder for all shows in the same bucket (One-Punch Man and One-Punch Man S2), I mean, is there a way to add the mapper option to the script? Is this doable with ut_label=anime?
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

1.
Sounds like you don't want AniDB series organization. I recommend using --db TheTVDB so all seasons belong to the same series {n}.


2.
If you are set on using --db AniDB for reasons I can't imagine, then you can access the TheTVDB series name like so, which would be the same for both One Punch man series seasons:

Code: Select all

{AnimeList.TheTVDB.seriesName}

3.
The amc script will inherit the --mapper option, and that's a Groovy expressions, so you can check the label, or other things, and map episodes accordingly:

Code: Select all

--mapper "label =~ /anime/ ? [episode, AnimeList.TheTVDB] : [episode, XEM.AniDB]"
:idea: Consider multiple mappings, derived from different sources, based on the label parameter. Not sure if this actually makes sense though. :lol:


4.
{sc} is always undefined for AniDB, since all season values will be undefined. {sc} is going to be 1 or more for TheTVDB data since there's generally at least one season for any give series.

:idea: Are you using {sc} to check if the database is AniDB or TheTVDB? Because that's effectively what you're doing, and using {info.database} would be more readable. ;)
:idea: Please read the FAQ and How to Request Help.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: support for XEM?

Post by devster »

rednoah wrote: 06 Jul 2019, 14:27 :idea: Are you using {sc} to check if the database is AniDB or TheTVDB? Because that's effectively what you're doing, and using {info.database} would be more readable. ;)
Not really, I only wanted to have absolute episode numbering for single-season animes, season-based for multi-season animes, even with different names. TheTVDB is a simpler solution, with the mapper as suggested on point 3, but I looked here since the category from the torrent client is Anime and amc.groovy defaults to AniDB for those.
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

Now that we have the --mapper feature, it's probably feasible to always force TV Mode / TheTVDB while using --mapper to make it work for AniDB-numbered files.
:idea: Please read the FAQ and How to Request Help.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: support for XEM?

Post by devster »

I apologize for asking, but as source is no longer available, is it possible to have a recap of the available mappers and what they match to?
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

The --mapper option accepts a Groovy expression, that can yield Episode or Episode[] objects. (i.e. map on episode to one or more other episodes)


e.g. use and rename with TheTVDB episode data, but use AnimeList.AniDB episode mappings (if available) for matching:

Code: Select all

filebot -rename . --db TheTVDB --mapper AnimeList.AniDB -non-strict

--mapper expressions you will most likely find useful:

Code: Select all

AnimeList.AniDB

Code: Select all

AnimeList.TheTVDB

Code: Select all

XEM.TheTVDB

Code: Select all

XEM.AniDB
e.g. map to itself (i.e. identity mapper, do nothing)

Code: Select all

episode
e.g. re-number episode to Season 1 Episode (e+1) and match accordingly:

Code: Select all

episode.derive(1, e + 1)
e.g. use different mapper for different TV Shows:

Code: Select all

n =~ /Monogatari/ ? AnimeList.AniDB : episode
e.g. use multiple mappers at the same time, and let the matcher try to figure out the rest given the available options (NOTE: more options ➔ more room for error)

Code: Select all

[episode, AnimeList.AniDB, XEM.AniDB]
e.g. do your own thing entirely:

Code: Select all

[seriesName: /My Series/, season: 1, episode: 1, title: /Hello World/]

:idea: You can use the Format Editor to test and prototype --mapper expressions.


:idea: Time will tell which approach is best. The --mapper option allows you to do anything, but just like --filter, how to best use it probably depends on the exact use case, and maybe over time we can come up with a "standard" --mapper that works well enough for most use cases.
:idea: Please read the FAQ and How to Request Help.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: support for XEM?

Post by devster »

Thanks, this may be worth a pinned post.
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

I guess I could paste this in into a --mapper man page, and then update as things change.
:idea: Please read the FAQ and How to Request Help.
crawfs
Posts: 24
Joined: 01 Feb 2019, 09:26

Re: support for XEM?

Post by crawfs »

Hey, do you have a solution for the fact that files named with absolute ordering which are from anime that have the show split into 3 separate seasons doesn't work with the mapper? Unfortunately it's a bit of a deal breaker for using this feature as it will likely break a lot of stuff for me.

To clarify this is the issue I raised in this comment: viewtopic.php?p=44573#p44573
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

The use cases discussed in June should work nowadays.

What have you tried so far? What doesn't work as expected?

I'll need specific examples, and logs, please so I can help you out with concrete solutions. ;)

:idea: I've been testing with the Monogatari series where 7 AniDB entities correlate to 7 seasons of a single TheTVDB entity. So it should generally work.
:idea: Please read the FAQ and How to Request Help.
crawfs
Posts: 24
Joined: 01 Feb 2019, 09:26

Re: support for XEM?

Post by crawfs »

Alright, I'll take another look and post based on how it resolves, I haven't tested it since back then.
Corey3443
Posts: 23
Joined: 03 Sep 2014, 02:55

Re: support for XEM?

Post by Corey3443 »

I just saw this thread and was wondering if the mapper function allows you to use —dB tvdb but keep the original Romanized Japanese title for anime? I was using a csv generated from XML to map titles but this looks like it could be cleaner.

An example would be great if this is possible.
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

Yes. Give me an example file path and example result, and I'll give you an example command to make that happen. ;)
:idea: Please read the FAQ and How to Request Help.
Corey3443
Posts: 23
Joined: 03 Sep 2014, 02:55

Re: support for XEM?

Post by Corey3443 »

"Boku no Hero Academia" is probably a good example. TVDB uses My Hero Academia

So I would be expecting it stored like \path\to\Boku no Hero Academia\Season 4\Boku.no.Hero.Academia.S04E01.A064.720p.GROUP.mkv

My current name string. I would, of course, add the path later, but currently, a bash script has been handling moving files as part of my download-task; but if i can get filebot naming the way I like it, ill change it so filebot does the move.

Code: Select all

{n.space('.').replace(/]/,'.')+'.'}{s00e00}{episode.special ? '.'+t.space('_') : ''}{'.'+vf}{any{'.'+source}{'.'+fn.match(/BD|Blu-ray/)}}{bitdepth == 10 ? '.10bit' : null}{any{'.'+group}{'.NOGRP'}}
Since sleeping on the idea, it got me thinking that will work for 90% of cases, but for shows like "Nanatsu no Taizai" that have different titles for each season, would it still be possible to resolve the seasons to just "Nanatsu no Taizai" rather than like "Nanatsu no Taizai - Kamigami no Gekirin" which is season 3?

ie: \path\to\Nanatsu no Taizai\Season 3\Nanatsu.no.Taizai.S03E01.720p.GROUP.mkv
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

e.g.

Code: Select all

{db.AniDB.primaryTitle}

filebot -list is a good tool for testing on a complete set of episodes:

Code: Select all

filebot -list --q "Boku no Hero Academia" --format "{db.AniDB.primaryTitle}/Season {s}/{db.AniDB.primaryTitle} - {s00e00} - {t}" --filter "e == 1" --log INFO
Boku no Hero Academia/Season 1/Boku no Hero Academia - S01E01 - Izuku Midoriya: Origin
Boku no Hero Academia (2017)/Season 2/Boku no Hero Academia (2017) - S02E01 - That's the Idea, Ochaco
Boku no Hero Academia (2018)/Season 3/Boku no Hero Academia (2018) - S03E01 - Game Start
Boku no Hero Academia (2019)/Season 4/Boku no Hero Academia (2019) - S04E01 - The Scoop on U.A. Class 1-A
:idea: The dynamic database binding {db} like so to get the AniDB romanji title: {db.AniDB.primaryTitle}

:idea: Note that --mapper isn't necessary for this use case if files are already named using TheTVDB SxE numbering, though {db} does of course utilize AniDB / TheTVDB mapping data internally.

:idea: Looks like "Boku no Hero Academia" is already a good example for multi-season Anime, since each season is a different entry on AniDB it it seems to be working correctly here.
:idea: Please read the FAQ and How to Request Help.
Corey3443
Posts: 23
Joined: 03 Sep 2014, 02:55

Re: support for XEM?

Post by Corey3443 »

So how about files with the original sourced names? I should have probably included them above instead of just "what I wanted". The above as mentioned already had SxE data which was sourced separately, so realistically not a fair comparison.

Here are a few examples (hopefully these will be varied enough to cover all bases):

Code: Select all

[Group] Boku no Hero Academia - 64 [720p].mkv (tvdb s4)
[Group] Nanatsu no Taizai - Kamigami no Gekirin - 01 [720p].mkv (tvdb s3)
[Group] Sword Art Online - Alicization - War of Underworld - 01 [720p].mkv (tvdb s4)
My main goal is to keep romanji titles while having access to sxe and absolute numbers for my naming scheme. I would also like to keep the main series romanji title for the series folder.

ie: "\path\to\sword art online\" no matter the season
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

In this case, the --mapper option will make sure you get the correct match according to AniDB naming and numbering, even though we're using TheTVDB (SxE Airdate Order) as database for naming and formatting:

Code: Select all

filebot -rename "Boku no Hero Academia - 64.mkv" --db TheTVDB --mapper AnimeList.AniDB -non-strict --action TEST --log INFO
[TEST] from [Boku no Hero Academia - 64.mkv] to [My Hero Academia - 4x01 - The Scoop on U.A. Class 1-A.mkv]

Now we just use the format expression discussed previously, and we get the desired destination path:

Code: Select all

--format "{db.AniDB.primaryTitle}/Season {s}/{db.AniDB.primaryTitle} - {s00e00} - {t}"

Code: Select all

[TEST] from [Boku no Hero Academia - 64.mkv] to [Boku no Hero Academia (2019)/Season 4/Boku no Hero Academia (2019) - S04E01 - The Scoop on U.A. Class 1-A.mkv]


EDIT:

You'll probably want to use replaceTrailingBrackets() on the AniDB/Romanji-based series name, at least on the folder level, to combine different AniDB entries (with distinct series names) into the same folder (if possible).

Code: Select all

db.AniDB.primaryTitle.replaceTrailingBrackets()

Code: Select all

filebot -rename "Boku no Hero Academia - 64.mkv" --db TheTVDB --mapper AnimeList.AniDB -non-strict --action TEST --log INFO --format "{db.AniDB.primaryTitle.replaceTrailingBrackets()}/Season {s}/{db.AniDB.primaryTitle} - {s00e00} - {t}"
:idea: Please read the FAQ and How to Request Help.
Corey3443
Posts: 23
Joined: 03 Sep 2014, 02:55

Re: support for XEM?

Post by Corey3443 »

I'll have a play and see if I can come up with any oddities. thanks rednoah =)

edit: doesn't look like it will do what I want for anything that has an alternative name for the season. ie: sword art online s3 title var is "Sword Art Online Alicization" instead of just "Sword Art Online".

It's fine, I'll just continue using what I had in place; I just thought I might be able to simplify the process.
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

:o I found a new use case for --mapper today:

Code: Select all

--mapper "episode.derive(0, 0)"
8-) Set SxE to 0x0 to let Match by Title take over:

Code: Select all

$ filebot -rename *.mkv --db TheTVDB --mapper "episode.derive(0, 0)" -non-strict --action TEST --log INFO
[TEST] from [South Park S01E01 Tegridy Farms.mkv] to [South Park - 22x04 - Tegridy Farms.mkv]
:arrow: viewtopic.php?f=4&t=11221
:idea: Please read the FAQ and How to Request Help.
ZyFinity
Posts: 10
Joined: 28 Jan 2022, 10:25

Re: support for XEM?

Post by ZyFinity »

@rednoah

I believe the XEM mapping is not working at the moment as XEM changed their domain from "thexem.de" to "thexem.info"
Where the mapping requests are getting "301 Moved Permanently" errors in the latest filebot version
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

FileBot r9352 changes the API endpoint to https://thexem.info/ so it should work again.


:?: While you're here. Are you actually using the {XEM} binding for some use case successfully? I've not found it useful for anything, since AnimeLists already takes care of AniDB/TheTVDB mappings and better at that.
:idea: Please read the FAQ and How to Request Help.
ZyFinity
Posts: 10
Joined: 28 Jan 2022, 10:25

Re: support for XEM?

Post by ZyFinity »

Is AnimeLists actually better and if so in what way?
I wanted to also ask why filebot only connects to a centralised "filebot hosted" animelists db that gets pulled monthly rather than just allowing us the user to download the database at our wanted set interval locally or even whenever there's a commit to the github repo or something. As I would be wanting to potentially have this setup with airing shows and be automated, however I guess this is where a fallback to the xem could come in handy.

Secondly, the reason I want this, is that I have a very large library sorted perfectly following AniDB with absolute numbering e.g. foldername: (animename [anidb-id])
What I've done is create a simple groovy script that extracts the anidb id from the folder name so that every anime should be perfectly mapped to the TVDB format.

One thing i noticed however is that file bot pulls a mapping for the show from anidb -> tvdb correctly, however then does a "reversemap" for whatever reason?
and then ends up getting a wrong match depending on the file layout.

I tested this by having the following dummy folder setup:

Code: Select all

/Attack on Titan The Final Season (2022) [anidb-16177]/
                                                                                   /Attack on Titan The Final Season - 1 - Judgement [1080p] [Subsplease].mkv
                                                                                   /Attack on Titan The Final Season - 2 - Sneak Attack [1080p] [Subsplease].mkv
                                                                                   /Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mkv
And it matched I believe only episode 2 correctly and mismatched the others to other episodes within the same season. This test purposely included missing episodes for testing reasons.

When I changed the test so instead of episode 12 it was episode 3, it seemed to map as expected. or is it simply that the original naming of the episodes are sub optimal?
ZyFinity
Posts: 10
Joined: 28 Jan 2022, 10:25

Re: support for XEM?

Post by ZyFinity »

I just ran some tests, and it seems animelist mapped incorrectly here with that example folder structure above, what would the reasoning for that be?


Using THE XEM

Code: Select all

filebot.exe -script "C:/Users/Documents/AnidbToTvdb/anidbToTvdb.groovy" -non-strict --action TEST
Rename episodes using [AniDB] with [Absolute]
Lookup via [16177]
Fetching episode data for [16177]
└─ 12 episodes
Apply mapper [XEM.TheTVDB] on [12] episodes
Map [Attack on Titan The Final Season (2022) - 01 - Judgment] to [Attack on Titan - 1x01]
Map [Attack on Titan The Final Season (2022) - 02 - Sneak Attack] to [Attack on Titan - 1x02]
Map [Attack on Titan The Final Season (2022) - 03 - Two Brothers] to [Attack on Titan - 1x03]
Map [Attack on Titan The Final Season (2022) - 04 - Memories of the Future] to [Attack on Titan - 1x04]
Map [Attack on Titan The Final Season (2022) - 05 - From You, 2,000 Years Ago] to [Attack on Titan - 1x05]
Map [Attack on Titan The Final Season (2022) - 06 - Thaw] to [Attack on Titan - 1x06]
Map [Attack on Titan The Final Season (2022) - 07 - Sunset] to [Attack on Titan - 1x07]
Map [Attack on Titan The Final Season (2022) - 08 - Pride] to [Attack on Titan - 1x08]
Map [Attack on Titan The Final Season (2022) - 09 - Night of the End] to [Attack on Titan - 1x09]
Map [Attack on Titan The Final Season (2022) - 10 - Traitor] to [Attack on Titan - 1x10]
Map [Attack on Titan The Final Season (2022) - 11 - Retrospective] to [Attack on Titan - 1x11]
Map [Attack on Titan The Final Season (2022) - 12 - The Dawn of Humanity] to [Attack on Titan - 1x12]
Reverse Map [Attack on Titan - 1x01] to [Attack on Titan The Final Season (2022) - 01 - Judgment]
Reverse Map [Attack on Titan - 1x12] to [Attack on Titan The Final Season (2022) - 12 - The Dawn of Humanity]
Reverse Map [Attack on Titan - 1x02] to [Attack on Titan The Final Season (2022) - 02 - Sneak Attack]
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 1 - Judgment [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E17 - Judgment.mkv]
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E28 - The Dawn of Humanity.mkv]
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 2 - Sneak Attack [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E18 - Sneak Attack.mkv]
Processed 3 files
Done ?(?????)?

Using AnimeList

Code: Select all

filebot.exe -script "C:/Users/Documents/AnidbToTvdb/anidbToTvdb.groovy" -non-strict --action TEST
Rename episodes using [AniDB] with [Absolute]
Lookup via [16177]
Fetching episode data for [16177]
└─ 12 episodes
Apply mapper [AnimeList.TheTVDB] on [12] episodes
Map [Attack on Titan The Final Season (2022) - 01 - Judgment] to [Attack on Titan - 4x17]
Map [Attack on Titan The Final Season (2022) - 02 - Sneak Attack] to [Attack on Titan - 4x18]
Map [Attack on Titan The Final Season (2022) - 03 - Two Brothers] to [Attack on Titan - 4x19]
Map [Attack on Titan The Final Season (2022) - 04 - Memories of the Future] to [Attack on Titan - 4x20]
Map [Attack on Titan The Final Season (2022) - 05 - From You, 2,000 Years Ago] to [Attack on Titan - 4x21]
Map [Attack on Titan The Final Season (2022) - 06 - Thaw] to [Attack on Titan - 4x22]
Map [Attack on Titan The Final Season (2022) - 07 - Sunset] to [Attack on Titan - 4x23]
Map [Attack on Titan The Final Season (2022) - 08 - Pride] to [Attack on Titan - 4x24]
Map [Attack on Titan The Final Season (2022) - 09 - Night of the End] to [Attack on Titan - 4x25]
Map [Attack on Titan The Final Season (2022) - 10 - Traitor] to [Attack on Titan - 4x26]
Map [Attack on Titan The Final Season (2022) - 11 - Retrospective] to [Attack on Titan - 4x27]
Map [Attack on Titan The Final Season (2022) - 12 - The Dawn of Humanity] to [Attack on Titan - 4x28]
Reverse Map [Attack on Titan - 4x22] to [Attack on Titan The Final Season (2022) - 06 - Thaw]
Reverse Map [Attack on Titan - 4x28] to [Attack on Titan The Final Season (2022) - 12 - The Dawn of Humanity]
Reverse Map [Attack on Titan - 4x18] to [Attack on Titan The Final Season (2022) - 02 - Sneak Attack]
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 1 - Judgment [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E22 - Thaw.mkv]
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E28 - The Dawn of Humanity.mkv]
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 2 - Sneak Attack [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E18 - Sneak Attack.mkv]
Processed 3 files
Done ?(?????)?
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

ZyFinity wrote: 06 Nov 2022, 23:00 Is AnimeLists actually better and if so in what way?
ZyFinity wrote: 07 Nov 2022, 03:06 I just ran some tests, and it seems animelist mapped incorrectly here with that example folder structure above, what would the reasoning for that be?
The console output you posted shows that AnimeLists correctly maps Attack on Titan The Final Season (2022) - 01 to 4x17:

Code: Select all

Map [Attack on Titan The Final Season (2022) - 01 - Judgment] to [Attack on Titan - 4x17]

EDIT: I get confused. I don't watch that series so I don't actually know what the correct mapping should be for that one. I guess the mapping is right, but matching doesn't work out for other reasons. I'll check again some other day when I actually have time to research that series. The series / season names seem to be especially confusing.


The XEM mapping is definitely wrong, though FileBot does seem to arrive at the correct match in your specific use case, that's mostly by happy accident:

Code: Select all

Map [Attack on Titan The Final Season (2022) - 01 - Judgment] to [Attack on Titan - 1x01]
:!: TheXEM can't work reliably for similarly-named shows because the API doesn't provide AniDB ID / TheTVDB ID mappings. The API might have improved over time since we started this thread here in 2018 but I haven't looked into TheXEM since then.


EDIT: Map [A] to [M] indicates that you might be using --mapper the wrong way around. The [A] is what you want to see in the destination file path. The [M] is what you have in your source file names and should match that, e.g. Map [Attack on Titan The Final Season (2022) - 01 - Judgment] to [Attack on Titan - 4x17] means that you want to match files currently named "4x17" and then rename them to "01".



ZyFinity wrote: 06 Nov 2022, 23:00 I wanted to also ask why filebot only connects to a centralised "filebot hosted" animelists db that gets pulled monthly rather than just allowing us the user to download the database at our wanted set interval locally or even whenever there's a commit to the github repo or something. As I would be wanting to potentially have this setup with airing shows and be automated, however I guess this is where a fallback to the xem could come in handy.
* GitHub is not a CDN
* FileBot uses a modified XML file which adds in additional information, strips unnecessary entries, adds support for XZ compression and If-Modified-Since requests, etc
* FileBot does check for updates (of our modified XML file) bi-weekly-ish nowadays (I believe it's only updated every 1-2 weeks on the server-side though; but this can be adjusted if there is a actual use case that requires regular frequent updates; but the mappings are maintained by humans so entries are added slowly, and almost never change once added)



ZyFinity wrote: 06 Nov 2022, 23:00 One thing i noticed however is that file bot pulls a mapping for the show from anidb -> tvdb correctly, however then does a "reversemap" for whatever reason?
and then ends up getting a wrong match depending on the file layout.
The --mapper option allows you to match an Episode object as if it was another Episode object, but rename with the original Episode object:

Code: Select all

Start with A
Map A to M (for matching)
Reverse Map M to A (for renaming)
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: support for XEM?

Post by rednoah »

I've re-created your file structure and ran a few tests:

Code: Select all

Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 1 - Judgement [1080p] [Subsplease].mp4
Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 2 - Sneak Attack [1080p] [Subsplease].mp4
Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mp4

In this case, you'll want to use --db AniDB and match files with AniDB information (i.e. no mapper) but then translate to TheTVDB episode information at format time by using the {db} binding (uses AnimeLists internally) in your --format expression. The --q option is very useful in this case because it'll allows us to force lookup-by-ID and skip search-by-name entirely:

Code: Select all

$ filebot -rename -r Anime --q "{ f.path.match(/anidb-([0-9]+)/) }" --db AniDB --output "TV Shows" --format "{ db.TheTVDB.plex.id }" -non-strict --action TEST --log INFO
[TEST] from [Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 1 - Judgement [1080p] [Subsplease].mp4] to [TV Shows/TV Shows/Attack on Titan {tvdb-267440}/Season 04/Attack on Titan - S04E17 - Judgment.mp4]
[TEST] from [Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mp4] to [TV Shows/TV Shows/Attack on Titan {tvdb-267440}/Season 04/Attack on Titan - S04E28 - The Dawn of Humanity.mp4]
[TEST] from [Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 2 - Sneak Attack [1080p] [Subsplease].mp4] to [TV Shows/TV Shows/Attack on Titan {tvdb-267440}/Season 04/Attack on Titan - S04E18 - Sneak Attack.mp4]



In this case, --mapper does not work well because [anidb-16177] isn't used during episode matching, and the ID is meaningless to TheTVDB for series lookup purposes, and the file name doesn't match AniDB primary naming either:

Code: Select all

$ filebot -rename -r Anime --db TheTVDB --mapper AnimeList.AniDB --output "TV Shows" --format "{ plex.id }" -non-strict --action TEST --log INFO
[TEST] from [Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mp4] to [TV Shows/TV Shows/Attack on Titan {tvdb-267440}/Season 01/Attack on Titan - S01E12 - Wound - The Struggle for Trost.mp4]
e.g. In this case, the --mapper instructs FileBot to match "Shingeki no Kyojin: The Final Season (2022) - 12" but that's completely different from the file name "Attack on Titan The Final Season - 12 - The Dawn of Humanity" and so FileBot cannot arrive at the correct match based on series name or episode title, and so it'll just end up at some 12th Episode of some series vaguely named Attack on Titan:

Code: Select all

Map [Attack on Titan - 4x28 - The Dawn of Humanity] to [Shingeki no Kyojin: The Final Season (2022) - 12]
:idea: Please read the FAQ and How to Request Help.
ZyFinity
Posts: 10
Joined: 28 Jan 2022, 10:25

Re: [DEPRECATED] support for XEM?

Post by ZyFinity »

Thanks for that, I actually wrote up a whole reply to this however I accidentally closed the tab.

Anyways to keep it short,
What I don't understand is why in:
In this case, --mapper does not work well because [anidb-16177] isn't used during episode matching, and the ID is meaningless to TheTVDB for series lookup purposes, and the file name doesn't match AniDB primary naming either:
Works perfectly fine (I tested your config myself), while my config using AniDB as the DB, AnimeList.TheTVDB as the mapper and {plex} as the format expression led to the incorrect results as seen in my previous post?
They seem to be doing or atleast be tasked to do the same thing, right? or am I missing something?
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEPRECATED] support for XEM?

Post by rednoah »

--mapper and --format are programmable elements so they're not tasked with anything specific, but can be used for anything. --mapper comes in before matching and only applies to matching. --format is just some arbitrary display value generated by your code for a given match object.

:idea: This may be important if you need xattr metadata to match the file names. Because if you do --db AniDB --format {db.TheTVDB.plex} then FileBot is working with AniDB episode information and thus write that xattr metadata accordingly, which then won't match the file names, because FileBot is completely unaware of what your format is doing.




:?: Do you get different results from me? What is your command? What is your console output?

Code: Select all

$ filebot -rename -r Anime --db TheTVDB --mapper AnimeList.AniDB --output "TV Shows" --format "{ plex.id }" -non-strict --action TEST --log INFO
[TEST] from [Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mp4] to [TV Shows/TV Shows/Attack on Titan {tvdb-267440}/Season 01/Attack on Titan - S01E12 - Wound - The Struggle for Trost.mp4]
:idea: Attack on Titan The Final Season - 12 - The Dawn of Humanity => Attack on Titan - S01E12 - Wound - The Struggle for Trost is wrong. --db TheTVDB --mapper AnimeList.AniDB does mean "I want TheTVDB episode information; but match files as if I was working with AniDB episode information" which does make sense but unfortunately doesn't work in this specific use case, though its known to work in most use cases.



:idea: --db AniDB --mapper AnimeList.TheTVDB means that you want AniDB naming but have TheTVDB SxE numbered files:

Code: Select all

$ filebot -rename *.mp4 --db AniDB --q 16177 --mapper AnimeList.TheTVDB --format "{ plex.id }" -non-strict --action TEST --log INFO
[TEST] from [Attack on Titan - 4x17.mp4] to [Anime/Shingeki no Kyojin - The Final Season (2022) {anidb-16177}/Shingeki no Kyojin - The Final Season (2022) - 01 - Judgment.mp4]
:!: I had to add --q 16177 because AniDB has too many "Attack on Titan" series entries, and a search for "Attack on Titan" unfortunately does not include Shingeki no Kyojin - The Final Season (2022) in the Top 5 results.

:idea: TheTVDB => AniDB translation is not a common use case, and is not your use case as far as I can tell. You have AniDB naming and want TheTVDB naming, so you mean to convert from AniDB to TheTVDB.
:idea: Please read the FAQ and How to Request Help.
ZyFinity
Posts: 10
Joined: 28 Jan 2022, 10:25

Re: [DEPRECATED] support for XEM?

Post by ZyFinity »

So I get these results from the following:

Code: Select all

filebot -rename -r Anime --db AniDB--mapper AnimeList.TheTVDB --output "TV Shows" --format "{plex}" -non-strict --action TEST --log INFO
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 1 - Judgment [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E22 - Thaw.mkv]
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E28 - The Dawn of Humanity.mkv]
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 2 - Sneak Attack [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E18 - Sneak Attack.mkv]

While doing what you said does work:

Code: Select all

filebot -rename -r Anime --q "{ f.path.match(/anidb-([0-9]+)/) }" --db AniDB --output "TV Shows" --format "{ db.TheTVDB.plex.id }" -non-strict --action TEST --log INFO
[TEST] from [Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 1 - Judgement [1080p] [Subsplease].mp4] to [TV Shows/TV Shows/Attack on Titan {tvdb-267440}/Season 04/Attack on Titan - S04E17 - Judgment.mp4]
[TEST] from [Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mp4] to [TV Shows/TV Shows/Attack on Titan {tvdb-267440}/Season 04/Attack on Titan - S04E28 - The Dawn of Humanity.mp4]
[TEST] from [Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 2 - Sneak Attack [1080p] [Subsplease].mp4] to [TV Shows/TV Shows/Attack on Titan {tvdb-267440}/Season 04/Attack on Titan - S04E18 - Sneak Attack.mp4]
Do you get different results from me? What is your command? What is your console output?
Nope, I get the same results (shown above) and it works correctly.


:?: My question is, If I have a large library I want to convert from AniDB Absolute -> TVDB Season naming with every single anime having the anidb ID in the folder that I can extract with a groovy script. Is the method you posted of just having "{db.TheTVDB.plex.id}" in the format expression, the best way to go about it and the most reliable way?
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEPRECATED] support for XEM?

Post by rednoah »

Yes, in your case using AniDB as primary database will likely work best, because that's what matches your files best.


Using --format to simply output TheTVDB file paths based on AniDB episode of information has the advantage that if the format doesn't print anything due to the {db} binding not working for the episode at hand, you will get nice errors instead of missing file path parts (i.e. the result of a format partially working and partially not working).


If you need TheTVDB episode information in xattr metadata you will have to reprocess with --db TheTVDB again just to fix the xattr metadata attached to each file.


Please let us know how it goes. We can only guess what the best solution might be, but can't know for sure until we run things for real. ;)
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 24683
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEPRECATED] support for XEM?

Post by rednoah »

UPDATE: XEM

TheTVDB ➔ AniDB mapping not really useful for typical use cases due to API limitations.

e.g.

Code: Select all

TheTVDB::267440 | Attack on Titan | Season 4 | Episode 28
cannot be mapped to

Code: Select all

AniDB::16177 | Anime: Shingeki no Kyojin: The Final Season (2022) | Episode 12
In particular, the AniDB ID nor season-specific series name AniDB::16177 | Anime: Shingeki no Kyojin: The Final Season (2022) cannot be retrieved via the API. We can map to 6x12 but Season 6 in the context of AniDB means nothing, and there's no API to retrieve the corresponding AniDB series name and ID, and Episode 12 isn't useful because every AniDB series/season as a 12th episode, and so the AniDB series/season name is required to identify files.

The necessary information is available on the website, at least the season-specific AniDB series ID:
* https://thexem.info/xem/show/4469

But not via the machine-readable API:
* https://thexem.info/map/all?id=267440&origin=tvdb


e.g.

Code: Select all

$ filebot -list --q 267440 --db TheTVDB --format "{xem.AniDB} <= {episode}"
null - 01 <= Attack on Titan - 1x01 - To You, in 2000 Years: The Fall of Shiganshina (1)
...
Shingeki no Kyojin S2 - 01 <= Attack on Titan - 2x01 - Beast Titan
...
Shingeki no Kyojin S3 - 01 <= Attack on Titan - 3x01 - Smoke Signal
...
Shingeki no Kyojin S3 - 01 <= Attack on Titan - 3x13 - The Town Where Everything Began
...
Shingeki no Kyojin S4 - 01 <= Attack on Titan - 4x01 - The Other Side of the Sea
...
Shingeki no Kyojin S4 - 01 <= Attack on Titan - 4x17 - Judgment
...





EDIT:

FileBot r9354 updates {xem} and removes AniDB season/series name guesswork to make {xem} work or not work in a more predictable manner. TheTVDB ➔ AniDB mapping now passes back API records unmodified. AniDB ➔ TheTVDB mapping will now throw an error instead of maybe working, maybe not working, maybe working incorrectly.

Code: Select all

$ filebot -list --q 267440 --db TheTVDB --format "{xem.AniDB} <= {episode}"
Attack on Titan - 1x01 <= Attack on Titan - 1x01 - To You, in 2000 Years: The Fall of Shiganshina (1)
...
Attack on Titan - 2x01 <= Attack on Titan - 2x01 - Beast Titan
...
Attack on Titan - 3x01 <= Attack on Titan - 3x01 - Smoke Signal
...
Attack on Titan - 5x01 <= Attack on Titan - 4x01 - The Other Side of the Sea
...
Attack on Titan - 6x01 <= Attack on Titan - 4x17 - Judgment
...
:!: The Attack on Titan - 6x01 mapping would generally be useless for matching AniDB named files, because AniDB named files don't have season numbers, and instead identify "seasons" via a unique series name per "season".
:idea: Please read the FAQ and How to Request Help.
Locked