Need help renaming Naruto/Bleach/One Piece (hundreds of eps)

All about user-defined episode / movie / file name format expressions
Post Reply
weak_pig
Posts: 4
Joined: 08 Mar 2014, 07:53

Need help renaming Naruto/Bleach/One Piece (hundreds of eps)

Post by weak_pig »

I have trouble trying to get Filebot to automatically rename shows that has literally hundreds of episodes in them, like Naruto or One Piece.

An example is 122 episode of One Piece would be renamed as S01E22... which is incorrect.

I fetch data from TVDB.com.

anybody can help??
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by rednoah »

Fetch data from AniDB.
:idea: Please read the FAQ and How to Request Help.
weak_pig
Posts: 4
Joined: 08 Mar 2014, 07:53

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by weak_pig »

I prefer TVDB.

AniDB uses unreadable Japanese title variant when matching my shows
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by rednoah »

Then use TheTVDB and set Preferred Episode Order to Absolute Order
:idea: Please read the FAQ and How to Request Help.
weak_pig
Posts: 4
Joined: 08 Mar 2014, 07:53

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by weak_pig »

Not working... some of the files still get jumbled or confused and named after the wrong season...

never mind, i'll use the manual method.
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by rednoah »

If you use Absolute Order there can't be "wrong season" issues because there will be no season data on neither side.
:idea: Please read the FAQ and How to Request Help.
User avatar
mihawk90
Power User
Posts: 51
Joined: 18 Mar 2014, 00:41

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by mihawk90 »

But still there are those issues.

I've had them since pretty much forever, which was the sole reason I could never use this (in theory quite useful) piece of software.

As you can see on the Screenshot I've set it to absolute numbering, but it fetches a totally wrong episode:
filebot_issue_absolute_numbering.png
It matches with Season 0 (which is "Specials" in TVDB) Episode 01 (which is of course the first OVA).
Just if you're wondering, the format is this:

Code: Select all

{s.pad(2)}x{e.pad(2)} {t} [{group}][{absolute.pad(3)}]{vf}[{crc32}]
Weird thing is, it matches the first OVA but then apparently sets the season to 02...? Also with no episode.
I didn't get it to work currently but that doesn't matter as long as it finds the wrong episodes anyway.

Oh by the way, using AniDB as source doesn't help either, it finds even worse results.
I just find it weird that the main site advertises with anime, but the program apparently can't handle the most common release naming scheme in the fansub-world :S
Don't get me wrong, it's a great program in itself but this is kind of a killer for me :P


PS: Don't mind the dark color, I've installed a custom windows theme
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by rednoah »

Oh, that's new! I can confirm the issue as well.



Here's a few workarounds for the time being:

GUI: fetch episode list manually
https://www.youtube.com/watch?v=OJca0ip ... -5RoMclWPt

CLI: define filter expression

Code: Select all

--filter "episode.special == null"

EDIT: Fixed with r2075
:idea: Please read the FAQ and How to Request Help.
User avatar
mihawk90
Power User
Posts: 51
Joined: 18 Mar 2014, 00:41

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by mihawk90 »

Well that was a fast one ;)
It now finds the correct episode (in my case season 1 episode 1), but I can't seem to be able to name them to the SSxEE format. And as I understood earlier this is kind of intended(?), which confuses me a bit because isn't that the whole point of the program? :p

I want to be able to rename absolute numbered episodes into a season-divided naming scheme, but either I'm too stupid or it's just not possible.
I'm not exactly familiar with the TVDB-API but doesn't it return the season and episode information no matter how it's requested?
Where's the point of having a binding for season, episode and absolute numbering when season gets emptied and episode gets set to absolute when using absolute ordering :?:

/edit
Nevermind the above, I set it on Airdate order again and it's working like a charm now :) Still pulling correct episode(s) and naming seems to be alright :)
But then again, I don't understand what the setting is for then, when it pulls the info cross-setting anyway :P


PS: I'm getting a little exclamation mark and red background on the file, but renaming works fine, what's that :o
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by rednoah »

1.
Nope, FileBot is not made so you can rename absolute numbered anime to SxE :P But if all that info is available, e.g. TheTVDB with Airdate order, then it'll probably match up to whatever is most likely.

2.
Different data sources supported different Preferences. In Airdate mode you'll get SxE data (and possibly absolute numbers as well, but {e} and {absolute} will be different) and Absolute only gives you absolute numbering, so {e} will be the same as {absolute}. What numbers are available affects matching and how default formats like {sxe} and {e} work out.

3.
Means: You better double-check this one! Cause the numbers don't match up, but if you think it's alright, I'll just trust you and let you go ahead with Rename!

BONUS:
If TheTVDB give you the extra absolute numbering info then Absolute -> SxE will probably work. But if it doesn't you just have to be smart about it.

Step 1. Rename using Absolute numbering. This will add episode titles.
Step 2. Rename using Airdate numbering. The episode titles make sure it'll pick the correct match.

@see http://filebot.net/scripts/abs2sxe.groovy
:idea: Please read the FAQ and How to Request Help.
User avatar
mihawk90
Power User
Posts: 51
Joined: 18 Mar 2014, 00:41

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by mihawk90 »

So this is mainly an option for cross-scraper compatibility as I understand?

And thanks for the bonus, that was just what I was about to ask :P

But still wondering, why aren't the variables always the same content?
I mean why isn't season always season and episode always episode?
As far as I understand Filebot trys to figure out on his own what the numbers in the original file name mean, thus creating weird results from time to time.
For example I just tried renaming some more episodes, as soon as they got above 100 they got fetched totally wrong because Filebot thought "123" was meant to mean season 1 episode 23 instead of absolute number 123.

Wouldn't it be easier for the user (and probably the program) to define the input format and have the variables always have the same meaning? Because the variables seem to have different "meanings" (read: contents) depending on the output mode. So basically, I think the user should define the input mode, not the output mode, because that's what the format string is for, no?
Maybe I'm understanding something completely wrong here but that's at least what I'd have done :D
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by rednoah »

Well, 101 is a tricky format. FileBot will treat it as both 1x01 and 101 and then cross-reference with the episode data. Though when in doubt it's set to prefer SxE just so the 99% of users that don't care about Anime don't get odd results. Now the 1% that does care about Anime should use AniDB, where in the absence of 1x01 data, it can only mean 101.

So by selecting TheTVDB / AniDB or Airdate / Absolute Order you are effectively selecting what the numbers mean, or can mean. You select AniDB, you define absolute format, you select TheTVDB/Airdate you select SxE format, you select TheTVDB/Absolute you select absolute format.

The only thing that would be missing is the "please translate my absolute numbered Anime episodes to Season/Episode format" and there is a script for that:
http://www.filebot.net/forums/viewtopic ... &t=5#p7188

You can do the same Step 1+2 process in the GUI to get there. Just takes two rounds of renaming. That's the flexibility the GUI tools gives you.

EDIT: Found an unrelated issue caused by multiepisode detection, that causes {sxe} binding to fail when using anidb, and may or may not affect matching. That one is fixed with r2083.

EDIT2: There some to be some issues for some test cases I've tried, depending on what data is in the db or not. If you have any issues make sure to send screenshots.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by rednoah »

Tested a bit with Naruto 001-220 and fine-tuned the logic a bit.

Code: Select all

filebot -script fn:abs2sxe /path/to/files --log off
Here's the output (tested with FileBot r2084):
http://pastebin.com/x49rKyTQ
:idea: Please read the FAQ and How to Request Help.
User avatar
mihawk90
Power User
Posts: 51
Joined: 18 Mar 2014, 00:41

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by mihawk90 »

Hey :)
Been a while and I just tried the script you provided the first time :D

It's working OK'ish from what I see, but for some reason no date is added to my filenames (also there's no output in cmd for me?).
Is there any possiblity of using a custom format with the script? If not I'd just throw it at the GUI and that's fine as well :)

PS: Seems the command isn't working in PowerShell, for some reason just nothing happens on my end ...
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by rednoah »

Why would it add dates?

It's doing to sets of renames, the first is internal and includes dates, the second is the final one that uses your --format (or default format if unspecified)

There's always output, if it's doing something. If it seems to not be doing anything I'd start with NOT specifying --log off

PS: I'm sure PowerShell can run commands just fine. If it can't run filebot then it can't run any executable and that's unlikely. ;)
:idea: Please read the FAQ and How to Request Help.
User avatar
mihawk90
Power User
Posts: 51
Joined: 18 Mar 2014, 00:41

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by mihawk90 »

Going to try with the --format option next time, thanks :)

I thought I read somewhere that it adds the date to then use the date to match the correct episode. But that might have been for the first step (I don't need/use date anyway so... who cares :D )

About the output, I tried with not specifying the --log option, and there was still no output, that's why I got confused :)

Code: Select all

C:\Users\Tarulia\Desktop\FileBot_4.0-portable>filebot -script fn:abs2sxe "C:\Volumes\NAS 1-2 1TB\Videos\Anime\Subbed\One Piece\rename"

C:\Users\Tarulia\Desktop\FileBot_4.0-portable>filebot -script fn:abs2sxe "C:\Volumes\NAS 1-2 1TB\Videos\Anime\Subbed\One Piece\rename"

C:\Users\Tarulia\Desktop\FileBot_4.0-portable>filebot -script fn:abs2sxe "C:\Volumes\NAS 1-2 1TB\Videos\Anime\Subbed\One Piece\rename2"

C:\Users\Tarulia\Desktop\FileBot_4.0-portable>
That's a copy of the cmd, so yeah :D Doesn't really matter I guess since it's working for now, I'm just wondering...

Not sure about the PowerShell "issue", maybe I specified something wrong or I was just too impatient or sth :)


/edit
Just tried in PowerShell, worked, I probably was just too impatient before or whatever :) The date gets added in the first step so that's where I got confused :D
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by rednoah »

You're using portable?

filebot.exe is a Win32 executable which means it does not have a console.
filebot.cmd is a CMD script which naturally is called from console and supports and waits for console output.

Windows probably defaults to filebot.exe when you should be using filebot.cmd
:idea: Please read the FAQ and How to Request Help.
User avatar
mihawk90
Power User
Posts: 51
Joined: 18 Mar 2014, 00:41

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by mihawk90 »

Yep... OK, this was the issue :) Makes sense when I think about it :D

But I'm wondering, is it recalculating the CRC in the script-version? There's a pretty long pause after fetching data the second time (when episodes are already named using date) and the second rename.

Earlier when I didn't specify the format and then threw the renamed files at Filebot, it calculated them as well. Though it appears to cache some values, right? It remembered the Group for example, it was nowhere in the filename and yet filebot still remembered it. So I'm wondering...

Here's a (shortened) log, I marked the pause at the bottom

Code: Select all

PS C:\Users\Tarulia\desktop\filebot_4.0-portable> .\filebot.cmd -script fn:abs2sxe "C:\Volumes\NAS 1-2 1TB\Videos\Anime\
Subbed\One Piece\rename" --format "{es.collect{ s.pad(2)+'x'+e.pad(2)}.join('-')} [{group}] {episodes*.absolute*.pad(3).
join('-')} [{crc32}]"
Rename episodes using [TheTVDB]
Auto-detected query: [One Piece]
Fetching episode data for [One Piece]
Apply Filter: {episode.season == null && episode.special == null}
Include [One Piece - 01 - I'm Luffy! The Man Who Will Become Pirate King!]
[...]
Include [One Piece - 652 - Final Battleground - D Block Battle Begins]
[RENAME] Rename [C:\Volumes\NAS 1-2 1TB\Videos\Anime\Subbed\One Piece\rename\[K-F]_One_Piece_041_[8FABB4D7].avi] to [One
 Piece - [00041] - Luffy's Best! Nami's Courage and the Straw Hat - [2000-09-13].avi]
[RENAME] Rename [C:\Volumes\NAS 1-2 1TB\Videos\Anime\Subbed\One Piece\rename\[K-F]_One_Piece_042_[6CEAAE3B].avi] to [One
 Piece - [00042] - Bursting Out! Fishman Arlong, Fearsome Attack From The Sea! - [2000-09-27].avi]
[RENAME] Rename [C:\Volumes\NAS 1-2 1TB\Videos\Anime\Subbed\One Piece\rename\[K-F]_One_Piece_043_[96AB4967].avi] to [One
 Piece - [00043] - The End of the Fishman Empire! Nami is my Comrade! - [2000-09-27].avi]
[RENAME] Rename [C:\Volumes\NAS 1-2 1TB\Videos\Anime\Subbed\One Piece\rename\[K-F]_One_Piece_044_[819851C0].avi] to [One
 Piece - [00044] - Setting off with a Smile! Farewell my Hometown, Cocoyashi Village! - [2000-10-11].avi]
[RENAME] Rename [C:\Volumes\NAS 1-2 1TB\Videos\Anime\Subbed\One Piece\rename\[K-F]_One_Piece_045_[408C5A6B].avi] to [One
 Piece - [00045] - Bounty! Straw Hat Luffy Becomes World Famous! - [2000-10-25].avi]
Processed 5 files
Rename episodes using [TheTVDB]
Auto-detected query: [One Piece]
Fetching episode data for [One Piece]
Apply Filter: {episode.special == null}
Include [One Piece - 1x01 - I'm Luffy! The Man Who Will Become Pirate King!]
[...]
Include [One Piece - 17x24 - Final Battleground - D Block Battle Begins]
Auto-detected query: [One Piece]
Fetching episode data for [One Piece]
Apply Filter: {episode.special == null}
Include [One Piece - 1x01 - I'm Luffy! The Man Who Will Become Pirate King!]
[...]
Include [One Piece - 17x24 - Final Battleground - D Block Battle Begins]

                                                                                      [### Pretty Long Pause Here ###]

[MOVE] Rename [C:\Volumes\NAS 1-2 1TB\Videos\Anime\Subbed\One Piece\rename\One Piece - [00043] - The End of the Fishman
Empire! Nami is my Comrade! - [2000-09-27].avi] to [03x13 [K-F] 043 [96AB4967].avi]
[MOVE] Rename [C:\Volumes\NAS 1-2 1TB\Videos\Anime\Subbed\One Piece\rename\One Piece - [00041] - Luffy's Best! Nami's Co
urage and the Straw Hat - [2000-09-13].avi] to [03x11 [K-F] 041 [8FABB4D7].avi]
[MOVE] Rename [C:\Volumes\NAS 1-2 1TB\Videos\Anime\Subbed\One Piece\rename\One Piece - [00042] - Bursting Out! Fishman A
rlong, Fearsome Attack From The Sea! - [2000-09-27].avi] to [03x12 [K-F] 042 [6CEAAE3B].avi]
[MOVE] Rename [C:\Volumes\NAS 1-2 1TB\Videos\Anime\Subbed\One Piece\rename\One Piece - [00044] - Setting off with a Smil
e! Farewell my Hometown, Cocoyashi Village! - [2000-10-11].avi] to [03x14 [K-F] 044 [819851C0].avi]
[MOVE] Rename [C:\Volumes\NAS 1-2 1TB\Videos\Anime\Subbed\One Piece\rename\One Piece - [00045] - Bounty! Straw Hat Luffy
 Becomes World Famous! - [2000-10-25].avi] to [03x15 [K-F] 045 [408C5A6B].avi]
Processed 5 files

-------------------- abs2sxe --------------------

[K-F]_One_Piece_041_[8FABB4D7].avi      ->      One Piece - [00041] - Luffy's Best! Nami's Courage and the Straw Hat - [
2000-09-13].avi ->      03x11 [K-F] 041 [8FABB4D7].avi
[K-F]_One_Piece_042_[6CEAAE3B].avi      ->      One Piece - [00042] - Bursting Out! Fishman Arlong, Fearsome Attack From
 The Sea! - [2000-09-27].avi    ->      03x12 [K-F] 042 [6CEAAE3B].avi
[K-F]_One_Piece_043_[96AB4967].avi      ->      One Piece - [00043] - The End of the Fishman Empire! Nami is my Comrade!
 - [2000-09-27].avi     ->      03x13 [K-F] 043 [96AB4967].avi
[K-F]_One_Piece_044_[819851C0].avi      ->      One Piece - [00044] - Setting off with a Smile! Farewell my Hometown, Co
coyashi Village! - [2000-10-11].avi     ->      03x14 [K-F] 044 [819851C0].avi
[K-F]_One_Piece_045_[408C5A6B].avi      ->      One Piece - [00045] - Bounty! Straw Hat Luffy Becomes World Famous! - [2
000-10-25].avi  ->      03x15 [K-F] 045 [408C5A6B].avi
Done ?(?????)?
PS C:\Users\Tarulia\desktop\filebot_4.0-portable>
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by rednoah »

xattr ;)

FileBot does remember the original name and metadata. But CRC32 is calculated on demand (if it's not known already due to naming standards). So {group} does check the original name for group patterns, but {crc32} does not check the original name for crc32 pattern.

EDIT: Fixed with r2306
:idea: Please read the FAQ and How to Request Help.
User avatar
mihawk90
Power User
Posts: 51
Joined: 18 Mar 2014, 00:41

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of

Post by mihawk90 »

Nice one.

Thanks again for the help :)
MasterCATZ
Posts: 43
Joined: 28 May 2012, 23:01

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of eps)

Post by MasterCATZ »

yeh stuck in this boat now as well

kodi removed anidb and making us use tvdb / tmdb , and those are needing to be serialized for some odd reason
even tho filebot seems to look them up just fine using their db

looks like they are doing bleach s1e1 to 366 then bloodwars s2e1 to ??? *sigh* I rather then stick to s17+e??? and looks like all the specials are now a shamble as well
User avatar
mihawk90
Power User
Posts: 51
Joined: 18 Mar 2014, 00:41

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of eps)

Post by mihawk90 »

This is a nearly 10 year old thread man...

Anyway, you don't *have* to serialise for TMDb at least. TMDb's default sorting for long-running anime is one big season as you already noticed. And if you're using that default naming it's a one-liner on a command line, you don't even need FileBot for that. If you wanna use FileBot it has a script for this very purpose as noted above.

They also do "episode groups" with which they do different groupings of episodes so Specials can end up in regular seasons depending on the episode group you're using. I don't know whether FileBot uses episode groups at all since I haven't used it in years.
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help renaming Naruto/Bleach/One Piece (hundreds of eps)

Post by rednoah »

Presets › Convert Absolute numbers to SxE numbers should take care of this kind of use case nowadays:
Screenshot



Alternatively, [Anime] Convert Absolute to SxE numbers › Option A: Align files and episodes manually may work better if your episodes are in order but somehow badly numbered:
:idea: Please read the FAQ and How to Request Help.
Post Reply