Anime number formatting for Specials: Shorts, Openings and Endings

All about user-defined episode / movie / file name format expressions
Post Reply
Romtromon
Posts: 25
Joined: 16 Sep 2016, 09:51

Anime number formatting for Specials: Shorts, Openings and Endings

Post by Romtromon »

Code: Select all

I:/Anime/{primaryTitle.replace(': ',' - ')} [{n.findMatch(group) ? null : group}] ({source} {vf} {vc} {ac})/{primaryTitle.replaceAll(/(?<=\w)[\w\s]/, '').replace(': ', '-')} {absolute.pad(2)} - {t.replace(': ', ' - ')}
So this is my current naming scheme for anime from anidb and I've come across a problem, as seen in the picture below the renamed file won't have an episode number. I would like to get the anidb numbering format for specials (S1, S2, etc.) on these files. I would also like to use the numbering scheme for openings and endings when renaming those, how would I accomplish this? Thanks in advance for any help.

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

Re: [HELP]

Post by rednoah »

Automatic matching won't work for those kinds of files. At best FileBot will interpret S1 as Season 1 and/or Episode 1.

1. Go to Episodes panel and select Special 1 to 6
2. Right-Click ➔ Send To ➔ Rename (or use drag-n-drop)
3. Drop files into Original Files and align if necessary

See Getting Started, Page 2:
http://www.filebot.net/getting-started/

As for formatting, FileBot has episode and special numbers. It doesn't know about any of the special AniDB tags/numbers like S1, OP1, ED2a, etc. You might be able to come up with some of that via {special} and {t}.

e.g.

Code: Select all

{any{e.pad(2)}{"Special $special"}}

You will see more examples for special handling for special episodes in the examples:

Code: Select all

{episode.special ? 'Special' : 'Season '+s}
:idea: Please read the FAQ and How to Request Help.
Romtromon
Posts: 25
Joined: 16 Sep 2016, 09:51

Re: Anime number formatting for Specials: Shorts, Openings and Endings

Post by Romtromon »

Thanks for the help and quick replies as usual! Also, I can't seem to find the OPs and EDs on the episode finder so is it not possible for me to rename them?

And would you be so kind as to explain that example code to me? I'd like to know what each part of it does please:

Code: Select all

{any{e}{'S'+special}.pad(2)}
User avatar
rednoah
The Source
Posts: 23051
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Anime number formatting for Specials: Shorts, Openings and Endings

Post by rednoah »

Romtromon wrote:Thanks for the help and quick replies as usual! Also, I can't seem to find the OPs and EDs on the episode finder so is it not possible for me to rename them?
Pretty much. FileBot ignores those right away so they can't interfere with matching.

The any function is documented here: viewtopic.php?f=5&t=1895
:idea: Please read the FAQ and How to Request Help.
Post Reply