[Anime] Rename [Kimetsu no Yaiba - Yuukaku-hen - 08] to [S03E08]

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
frallan123
Posts: 3
Joined: 14 Jan 2022, 00:24

[Anime] Rename [Kimetsu no Yaiba - Yuukaku-hen - 08] to [S03E08]

Post by frallan123 »

Hi

I'm using tvdb for my anime but for some reason on some shows it will match the episodes to the wrong season and delete the original files.
Thankfully there's a log so I can see which ones I need to redownload again but I dont know why it doesnt work.

This is my script

Code: Select all

filebot -script 'fn:amc' /volume1/Nerladdat/Uncompleted/Anime --output /volume1/Nerladdat/ --action MOVE -non-strict --order Airdate --conflict auto --lang en --def 'ut_label=TV' 'music=y' 'unsorted=y' 'artwork=y' 'skipExtract=y' 'seriesFormat=Anime/{plex.tail}' 'animeFormat=Anime/{plex.tail}' 'excludeList=.excludes' --apply refresh --log all --log-file '/volume1/Nerladdat/Uncompleted/filebot.log'
Episode in question

Code: Select all

[SubsPlease] Kimetsu no Yaiba - Yuukaku-hen - 08(720p) [BAD2EB42].mkv
Watching the log files it says

Code: Select all

Lookup via [Demon Slayer: Kimetsu no Yaiba]

Fetching episode data for [Demon Slayer: Kimetsu no Yaiba]
[AUTO] Delete [/volume1/Nerladdat/Anime/Demon Slayer - Kimetsu no Yaiba/Season 01/Demon Slayer - Kimetsu no Yaiba - S01E08 - The Smell of Enchanting Blood.mkv]
[MOVE] from [/volume1/Nerladdat/Uncompleted/Anime/[SubsPlease] Kimetsu no Yaiba - Yuukaku-hen - 08 (720p) [BAD2EB42].mkv] to [/volume1/Nerladdat/Anime/Demon Slayer - Kimetsu no Yaiba/Season 01/Demon Slayer - Kimetsu no Yaiba - S01E08 - The Smell of Enchanting Blood.mkv]
When running

Code: Select all

 filebot -list --q 'Kimetsu No Yaiba'
I get

Code: Select all

Demon Slayer: Kimetsu no Yaiba - 1x01 - Cruelty
Demon Slayer: Kimetsu no Yaiba - 1x02 - Trainer Sakonji Urokodaki
Demon Slayer: Kimetsu no Yaiba - 1x03 - Sabito and Makomo
Demon Slayer: Kimetsu no Yaiba - 1x04 - Final Selection
Demon Slayer: Kimetsu no Yaiba - 1x05 - My Own Steel
Demon Slayer: Kimetsu no Yaiba - 1x06 - Swordsman Accompanying a Demon
Demon Slayer: Kimetsu no Yaiba - 1x07 - Muzan Kibutsuji
Demon Slayer: Kimetsu no Yaiba - 1x08 - The Smell of Enchanting Blood
Demon Slayer: Kimetsu no Yaiba - 1x09 - Temari Demon and Arrow Demon
Demon Slayer: Kimetsu no Yaiba - 1x10 - Together Forever
Demon Slayer: Kimetsu no Yaiba - 1x11 - Tsuzumi Mansion
Demon Slayer: Kimetsu no Yaiba - 1x12 - The Boar Bares Its Fangs, Zenitsu Sleeps
Demon Slayer: Kimetsu no Yaiba - 1x13 - Something More Important Than Life
Demon Slayer: Kimetsu no Yaiba - 1x14 - The House with the Wisteria Family Crest
Demon Slayer: Kimetsu no Yaiba - 1x15 - Mount Natagumo
Demon Slayer: Kimetsu no Yaiba - 1x16 - Letting Someone Else Go First
Demon Slayer: Kimetsu no Yaiba - 1x17 - You Must Master a Single Thing
Demon Slayer: Kimetsu no Yaiba - 1x18 - A Forged Bond
Demon Slayer: Kimetsu no Yaiba - 1x19 - Hinokami
Demon Slayer: Kimetsu no Yaiba - 1x20 - Pretend Family
Demon Slayer: Kimetsu no Yaiba - 1x21 - Against Corps Rules
Demon Slayer: Kimetsu no Yaiba - 1x22 - Master of the Mansion
Demon Slayer: Kimetsu no Yaiba - 1x23 - Hashira Meeting
Demon Slayer: Kimetsu no Yaiba - 1x24 - Rehabilitation Training
Demon Slayer: Kimetsu no Yaiba - 1x25 - Tsuguko, Kanao Tsuyuri
Demon Slayer: Kimetsu no Yaiba - 1x26 - New Mission
Demon Slayer: Kimetsu no Yaiba - 2x01 - Flame Hashira Kyojuro Rengoku
Demon Slayer: Kimetsu no Yaiba - 2x02 - Deep Sleep
Demon Slayer: Kimetsu no Yaiba - 2x03 - Should Have Been
Demon Slayer: Kimetsu no Yaiba - 2x04 - Insult
Demon Slayer: Kimetsu no Yaiba - 2x05 - Move Forward!
Demon Slayer: Kimetsu no Yaiba - 2x06 - Akaza
Demon Slayer: Kimetsu no Yaiba - 2x07 - Set Your Heart Ablaze
Demon Slayer: Kimetsu no Yaiba - 3x01 - Sound Hashira Tengen Uzui
Demon Slayer: Kimetsu no Yaiba - 3x02 - Infiltrating the Entertainment District
Demon Slayer: Kimetsu no Yaiba - 3x03 - What Are You?
Demon Slayer: Kimetsu no Yaiba - 3x04 - Tonight
Demon Slayer: Kimetsu no Yaiba - 3x05 - Things Are Gonna Get Real Flashy!!
Demon Slayer: Kimetsu no Yaiba - 3x06 - Layered Memories
Demon Slayer: Kimetsu no Yaiba - 3x07 - Transformation
Demon Slayer: Kimetsu no Yaiba - 3x08 - Gathering
Demon Slayer: Kimetsu no Yaiba - 3x09 - Defeating an Upper Rank Demon
Demon Slayer: Kimetsu no Yaiba - 3x10 - TBA
Demon Slayer: Kimetsu no Yaiba - 3x11 - TBA
Demon Slayer: Kimetsu no Yaiba - 3x12 - TBA
Demon Slayer: Kimetsu no Yaiba - Special 1 - Movie: Sibling's Bond
Demon Slayer: Kimetsu no Yaiba - Special 2 - Demon Slayer Movie: InfinityTrain
Demon Slayer: Kimetsu no Yaiba - Special 3
Demon Slayer: Kimetsu no Yaiba - Special 4
Demon Slayer: Kimetsu no Yaiba - Special 5
Demon Slayer: Kimetsu no Yaiba - Special 6
Demon Slayer: Kimetsu no Yaiba - Special 7
Demon Slayer: Kimetsu no Yaiba - Special 8
Demon Slayer: Kimetsu no Yaiba - Special 9
Demon Slayer: Kimetsu no Yaiba - Special 10
Demon Slayer: Kimetsu no Yaiba - Special 11
So it should match on Season 3 episode 8 but it moves it to season 1.
I redownloaded S01E08 and I ran the same script with -test on it

Code: Select all

Input: /volume1/Nerladdat/Uncompleted/Anime/[Anipakku] Kimetsu no Yaiba 08.mkv
Input: /volume1/Nerladdat/Uncompleted/Anime/[SubsPlease] Kimetsu no Yaiba - Yuukaku-hen - 08(720p) [BAD2EB42].mkv
└─ xattr: Demon Slayer: Kimetsu no Yaiba - 1x08 - The Smell of Enchanting Blood
Process as TV Series [TV]
Group: {Series=true} => [[Anipakku] Kimetsu no Yaiba 08.mkv, [SubsPlease] Kimetsu no Yaiba - Yuukaku-hen - 08(720p) [BAD2EB42].mkv]
Rename episodes using [TheTVDB] with [Airdate]
Lookup via [Demon Slayer: Kimetsu no Yaiba, kimetsu no yaiba]
Fetching episode data for [Demon Slayer: Kimetsu no Yaiba]
[TEST] from [/volume1/Nerladdat/Uncompleted/Anime/[Anipakku] Kimetsu no Yaiba 08.mkv] to [/volume1/Nerladdat/Anime/Demon Slayer - Kimetsu no Yaiba/Season 03/Demon Slayer - Kimetsu no Yaiba - S03E08 - Gathering.mkv]
[TEST] from [/volume1/Nerladdat/Uncompleted/Anime/[SubsPlease] Kimetsu no Yaiba - Yuukaku-hen - 08(720p) [BAD2EB42].mkv] to [/volume1/Nerladdat/Anime/Demon Slayer - Kimetsu no Yaiba/Season 01/Demon Slayer - Kimetsu no Yaiba - S01E08 - The Smell of Enchanting Blood.mkv]
And it matches S01E08 to S03E08 and vice versa.

Any idea why?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Matching wrong season

Post by rednoah »

1.
You'll want to use --conflict skip (default if --conflict is left unspecified) to make sure not to overwrite existing files on conflict:

Code: Select all

--conflict skip


2.
The easy solution is to just use AniDB for AniDB named and numbered files. You won't get naming and numbering translated to TheTVDB information though.



3.
Anime naming and numbering is complicated. If your files are named based on AniDB series naming / numbering (no seasons; each season is it's own series) but you match that against TheTVDB series naming / numbering (one season for each AniDB series) then things can go awry if the file naming happens to not at all match the database episode information.


:idea: If you want to translate AniDB naming and numbering to TheTVDB naming and numbering, then you'll want to read this thread completely and thoroughly. The problem is complex. Different approaches will work more or less well, and are more or less easy to implement, depending on your exact use case:
rednoah wrote: 16 Nov 2011, 16:46 :!: Anime do not have season numbers so converting AniDB absolute numbers to TheTVDB SxE numbers ImageImage can be tricky.


EDIT:

4.
frallan123 wrote: 25 Jan 2022, 22:26

Code: Select all

Input: /volume1/Nerladdat/Uncompleted/Anime/[SubsPlease] Kimetsu no Yaiba - Yuukaku-hen - 08(720p) [BAD2EB42].mkv
└─ xattr: Demon Slayer: Kimetsu no Yaiba - 1x08 - The Smell of Enchanting Blood
Your test case is not clean. The selected file has already been matched and tagged, and thus "wants" to be matched to the same episode again in future runs, taking 1x08 away from the other file:
viewtopic.php?t=324


:!: You'll want to use filebot -revert un-move and un-tag files:
viewtopic.php?t=12133
:idea: Please read the FAQ and How to Request Help.
frallan123
Posts: 3
Joined: 14 Jan 2022, 00:24

Re: [Anime] Rename [Kimetsu no Yaiba - Yuukaku-hen - 08] to [S03E08]

Post by frallan123 »

Thanks for you reply.

I cleared the xattr and tried renaming the episode again and now it matched correctly.

I'm not sure if tvdb wasnt updated when the episode was released or why it would try to rename S03E08 to S01E08.

I prefer TvDB naming over AniDB so thats why I've renamed all my collection after TvDB.

if I run

Code: Select all

 filebot -list --q "Kimetsu no Yaiba" --db TheTVDB
it will show

Code: Select all

Demon Slayer: Kimetsu no Yaiba - 1x01 - Cruelty
Demon Slayer: Kimetsu no Yaiba - 1x02 - Trainer Sakonji Urokodaki
Demon Slayer: Kimetsu no Yaiba - 1x03 - Sabito and Makomo
Demon Slayer: Kimetsu no Yaiba - 1x04 - Final Selection
Demon Slayer: Kimetsu no Yaiba - 1x05 - My Own Steel
Demon Slayer: Kimetsu no Yaiba - 1x06 - Swordsman Accompanying a Demon
Demon Slayer: Kimetsu no Yaiba - 1x07 - Muzan Kibutsuji
Demon Slayer: Kimetsu no Yaiba - 1x08 - The Smell of Enchanting Blood
Demon Slayer: Kimetsu no Yaiba - 1x09 - Temari Demon and Arrow Demon
Demon Slayer: Kimetsu no Yaiba - 1x10 - Together Forever
Demon Slayer: Kimetsu no Yaiba - 1x11 - Tsuzumi Mansion
Demon Slayer: Kimetsu no Yaiba - 1x12 - The Boar Bares Its Fangs, Zenitsu Sleeps
Demon Slayer: Kimetsu no Yaiba - 1x13 - Something More Important Than Life
Demon Slayer: Kimetsu no Yaiba - 1x14 - The House with the Wisteria Family Crest
Demon Slayer: Kimetsu no Yaiba - 1x15 - Mount Natagumo
Demon Slayer: Kimetsu no Yaiba - 1x16 - Letting Someone Else Go First
Demon Slayer: Kimetsu no Yaiba - 1x17 - You Must Master a Single Thing
Demon Slayer: Kimetsu no Yaiba - 1x18 - A Forged Bond
Demon Slayer: Kimetsu no Yaiba - 1x19 - Hinokami
Demon Slayer: Kimetsu no Yaiba - 1x20 - Pretend Family
Demon Slayer: Kimetsu no Yaiba - 1x21 - Against Corps Rules
Demon Slayer: Kimetsu no Yaiba - 1x22 - Master of the Mansion
Demon Slayer: Kimetsu no Yaiba - 1x23 - Hashira Meeting
Demon Slayer: Kimetsu no Yaiba - 1x24 - Rehabilitation Training
Demon Slayer: Kimetsu no Yaiba - 1x25 - Tsuguko, Kanao Tsuyuri
Demon Slayer: Kimetsu no Yaiba - 1x26 - New Mission
Demon Slayer: Kimetsu no Yaiba - 2x01 - Flame Hashira Kyojuro Rengoku
Demon Slayer: Kimetsu no Yaiba - 2x02 - Deep Sleep
Demon Slayer: Kimetsu no Yaiba - 2x03 - Should Have Been
Demon Slayer: Kimetsu no Yaiba - 2x04 - Insult
Demon Slayer: Kimetsu no Yaiba - 2x05 - Move Forward!
Demon Slayer: Kimetsu no Yaiba - 2x06 - Akaza
Demon Slayer: Kimetsu no Yaiba - 2x07 - Set Your Heart Ablaze
Demon Slayer: Kimetsu no Yaiba - 3x01 - Sound Hashira Tengen Uzui
Demon Slayer: Kimetsu no Yaiba - 3x02 - Infiltrating the Entertainment District
Demon Slayer: Kimetsu no Yaiba - 3x03 - What Are You?
Demon Slayer: Kimetsu no Yaiba - 3x04 - Tonight
Demon Slayer: Kimetsu no Yaiba - 3x05 - Things Are Gonna Get Real Flashy!!
Demon Slayer: Kimetsu no Yaiba - 3x06 - Layered Memories
Demon Slayer: Kimetsu no Yaiba - 3x07 - Transformation
Demon Slayer: Kimetsu no Yaiba - 3x08 - Gathering
Demon Slayer: Kimetsu no Yaiba - 3x09 - Defeating an Upper Rank Demon
Demon Slayer: Kimetsu no Yaiba - 3x10 - TBA
Demon Slayer: Kimetsu no Yaiba - 3x11 - TBA
Demon Slayer: Kimetsu no Yaiba - 3x12 - TBA
Demon Slayer: Kimetsu no Yaiba - Special 1 - Movie: Sibling's Bond
Demon Slayer: Kimetsu no Yaiba - Special 2 - Demon Slayer Movie: InfinityTrain
Demon Slayer: Kimetsu no Yaiba - Special 3
Demon Slayer: Kimetsu no Yaiba - Special 4
Demon Slayer: Kimetsu no Yaiba - Special 5
Demon Slayer: Kimetsu no Yaiba - Special 6
Demon Slayer: Kimetsu no Yaiba - Special 7
Demon Slayer: Kimetsu no Yaiba - Special 8
Demon Slayer: Kimetsu no Yaiba - Special 9
Demon Slayer: Kimetsu no Yaiba - Special 10
Demon Slayer: Kimetsu no Yaiba - Special 11
So I guess it should work fine. I'll see this weekend when episode 9 is released if it matches correctly or not.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Anime] Rename [Kimetsu no Yaiba - Yuukaku-hen - 08] to [S03E08]

Post by rednoah »

:!: Kimetsu no Yaiba - Yuukaku-hen - 08 fundamentally can't be matched to Demon Slayer: Kimetsu no Yaiba - 3x08 - Gathering because the information necessary to make that link does not exist, neither on AniDB nor TheTVDB. FileBot can match series "Kimetsu no Yaiba" because it's in the file name, and it can match episode number "08" because it's in the file name. Thus FileBot will choose between 1x08 and 2x08 and 3x08 largely at random. There's a few other factors that come into play, so if you're lucky it might work, but all bets are off at this point, the odds are 1/3 against you. It most likely will not just work.


:arrow: You know that "Yuukaku-hen" refers to Season 3 so you can infer the meaning. But FileBot likely cannot, without extra information. That's were reading [Anime] Convert Absolute to SxE numbers thoroughly from beginning to end comes into play. It will in detail explain the options you have to bridge the missing information, some of which will be more or less suitable for your use case. If you only process the latest episode every week, then Option D will work well.



EDIT:

Option A / B / C do not work for this case. The "match by absolute number" approach generally doesn't work in this case because your files use numbers relative to the series-season. The "use Anime-Lists mapping information" approach doesn't work at this point in time because the mapping information that has been entered is incorrect and does not yet correctly handle "Yuukaku-hen".
:idea: Please read the FAQ and How to Request Help.
frallan123
Posts: 3
Joined: 14 Jan 2022, 00:24

Re: [Anime] Rename [Kimetsu no Yaiba - Yuukaku-hen - 08] to [S03E08]

Post by frallan123 »

Just wanted to say thanks once again.

Option D with --filter age worked perfectly.

Code: Select all

Input: /volume1/Nerladdat/Uncompleted/Anime/[SubsPlease] Kimetsu no Yaiba - Yuukaku-hen - 09 (720p) [E5AADC5E].mkv
Input: /volume1/Nerladdat/Uncompleted/Anime/[SubsPlease] Sono Bisque Doll wa Koi wo Suru - 04 (720p) [8FB63752].mkv
Process as TV Series [TV]
Group: {Series=true} => [[SubsPlease] Kimetsu no Yaiba - Yuukaku-hen - 09 (720p) [E5AADC5E].mkv, [SubsPlease] Sono Bisque Doll wa Koi wo Suru - 04 (720p) [8FB63752].mkv]
Rename episodes using [TheTVDB] with [Airdate]
Lookup via [Demon Slayer: Kimetsu no Yaiba, kimetsu no yaiba, sono bisque doll wa koi wo suru]
Fetching episode data for [Demon Slayer: Kimetsu no Yaiba]
Fetching episode data for [My Dress-Up Darling]
Apply filter [age < 5] on [68] options
Include [Demon Slayer: Kimetsu no Yaiba - 3x09 - Defeating an Upper Rank Demon]
Include [My Dress-Up Darling - 1x04 - Does This Belong to Your Girlfriend?]
[2] options remaining
[MOVE] from [/volume1/Nerladdat/Uncompleted/Anime/[SubsPlease] Kimetsu no Yaiba - Yuukaku-hen - 09 (720p) [E5AADC5E].mkv] to [/volume1/Nerladdat/Anime/Demon Slayer - Kimetsu no Yaiba/Season 03/Demon Slayer - Kimetsu no Yaiba - S03E09 - Defeating an Upper Rank Demon.mkv]
[MOVE] from [/volume1/Nerladdat/Uncompleted/Anime/[SubsPlease] Sono Bisque Doll wa Koi wo Suru - 04 (720p) [8FB63752].mkv] to [/volume1/Nerladdat/Anime/My Dress-Up Darling/Season 01/My Dress-Up Darling - S01E04 - Does This Belong to Your Girlfriend.mkv]
[REFRESH] Refresh File Services (/volume1/Nerladdat/Uncompleted/Anime)
[REFRESH] Refresh File Services (/volume1/Nerladdat/Anime/Demon Slayer - Kimetsu no Yaiba/Season 03)
[REFRESH] Refresh File Services (/volume1/Nerladdat/Anime/My Dress-Up Darling/Season 01)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Anime] Rename [Kimetsu no Yaiba - Yuukaku-hen - 08] to [S03E08]

Post by rednoah »

Yep, if you can guarantee that you only ever process the latest episode from this week, easy for some users but impossible for others, then that greatly changes and simplifies the problem at hand, and makes it easily solvable.
:idea: Please read the FAQ and How to Request Help.
Post Reply