[Anime] Convert Absolute to SxE numbers
Posted: 13 Jun 2015, 15:27
Anime files often use AniDB naming and Absolute numbering. However, Plex / Kodi / Emby / Jellyfin / etc require TheMovieDB / TheTVDB naming with Airdate SxE numbering. You will therefore have to translate the naming you have to standard TheMovieDB / TheTVDB naming and numbering. This may be more or less straight-forward and more or less suitable for unattended automation depending on the files at hand. There are many approaches which may work more or less well depending for your exact use case. DON'T PANIC! Please ask for advice here in the forums if you need help with any particular set of files.
Note that ⇆ mapping information is maintained by the Anime-Lists/anime-lists project.
e.g. use the dynamic {order} binding to rebase bindings such as {plex} or {sxe} to Airdate SxE episode information in your custom format:
You can use the Presets feature to create your own Convert Absolute to Airdate preset for easy access.
The same technique can be used to convert DVD SxE numbers to Airdate SxE numbers and vice versa.
e.g. match episodes based on ⇆ mapping information maintained by the Anime-Lists/anime-lists project via the --mapper option:
Please read Use --mapper expressions for AniDB / TheTVDB cross-entity matching for details and advanced usage examples.
e.g. use an age filter to match the given file to whichever episode was aired this week irregardless of naming and numbering:
--filter "age < 5" means that you know in advance and can thus guarantee that you will only ever process newly aired episodes within days of the release date.
Option A: Align files and episodes manually
If your files are already in sequential order then you may prefer to use Manual Matching instead of Automatic Matching. Please watch the How do I manually match files with episodes in linear order? video tutorial and read Linear Rename for command-line usage.Option B: Use the dynamic {db} binding to match AniDB / Absolute episodes to TheTVDB / Airdate SxE episodes
e.g. You may use the {db} database cross-reference binding to transform AniDB matches to TheTVDB matches:Format: Select all
{ db.TheTVDB.plex.name }
Option C: Use the dynamic {order} binding to match TheTVDB / Absolute episodes to TheTVDB / Airdate SxE episodes
In the best case, if absolute number information has already been added to TheTVDB and you have clearly named files (e.g. E501) then FileBot can easily match the absolute numbers with the correct episode in Airdate order and rename it using SxE information (e.g. S14E19). In the worst case, especially if files use ambiguous naming patterns (e.g. 501 can mean 5x01 or 501) you may need to:- Match with Absolute Order episode information using TheTVDB
- Translate Absolute Order episode data to Airdate Order in the format
e.g. use the dynamic {order} binding to rebase bindings such as {plex} or {sxe} to Airdate SxE episode information in your custom format:
Format: Select all
{ order.airdate.plex }
Format: Select all
{ order.airdate.plex.name }
Format: Select all
{ order.airdate.sxe }
You can use the Presets feature to create your own Convert Absolute to Airdate preset for easy access.
The same technique can be used to convert DVD SxE numbers to Airdate SxE numbers and vice versa.
Option D: Use the --mapper command-line option to match files with one order but rename with another order
e.g. match episodes by absolute episode number via the --mapper option and then rename files using the default Airdate SxE Order episode information:Console Output: Select all
$ filebot -rename *.mkv --db TheTVDB --mapper order.absolute.episode --format "{n} - {s00e00} - E{absolute}" -non-strict
[MOVE] Rename [One Piece 501.mkv] to [One Piece - S14E20 - E501.mkv]
e.g. match episodes based on ⇆ mapping information maintained by the Anime-Lists/anime-lists project via the --mapper option:
Console Output: Select all
$ filebot -rename *.mkv --db TheTVDB --mapper AnimeList.AniDB -non-strict
[MOVE] from [One Piece 501.mkv] to [One Piece - 14x20 - The Flames Are Lit - The Gray Terminal's Crisis.mkv]
Please read Use --mapper expressions for AniDB / TheTVDB cross-entity matching for details and advanced usage examples.
Option E: Use the --filter command-line option to explicitly match the one episode that was aired this week
Please read the amc script manual for details:rednoah wrote: ↑01 Aug 2012, 13:04 You can (and should) force Movie / Series / Anime mode by setting --def ut_label, and you can further define your own --filter rules to fine-tune matching to your exact needs, and avoid mismatches. For example, if one show is confused with another due to bad naming or missing data you can simply exclude the bad one, or if you only process recently aired episodes, then you could exclude episodes that have not aired recently from matching.
e.g. if you only process recently aired episodes you can virtually guarantee 100% auto-detection accuracy by adding simple filter rules such as these:Shell: Select all
--filter "age < 5" --def "ut_label=TV"
e.g. use an age filter to match the given file to whichever episode was aired this week irregardless of naming and numbering:
Console Output: Select all
$ filebot -rename *.mp4 --db TheTVDB --filter "age < 5" -non-strict
[MOVE] from [Kimetsu no Yaiba - Yuukaku-hen - Part C.mp4] to [Demon Slayer Kimetsu no Yaiba - 3x03 - What Are You.mp4]
--filter "age < 5" means that you know in advance and can thus guarantee that you will only ever process newly aired episodes within days of the release date.