Adding Episode Titel to Original Filename

All about user-defined episode / movie / file name format expressions
Post Reply
loungebob
Posts: 3
Joined: 08 Jan 2019, 15:27

Adding Episode Titel to Original Filename

Post by loungebob »

I'm sure I could figure it out through more hours of trial and error after having read through all those amazing scripts people keep writing but then again, I know when I'm defeated.

I think I want something rather simple but still cant figure out how to do it.

Original Filename e.g.:

Code: Select all

Castle.S01E01.1080p.AMZN.WEBRip.DDP5.1.x264-SOMEGROUP
Desired Filename after FileBot did its magic:

Code: Select all

Castle.S01E01.Flowers.For.Your.Grave.1080p.AMZN.WEBRip.DDP5.1.x264-SOMEGROUP
I would like FB to add the episode title after the season/episode naming scheme and before the resolution data (can be 720p/1080p/2160p). With dots between the episode title words, please :-)

Even better, since all my incoming are almost always properly formatted and named, I only would need FB for the exceptions like the above example, where the lame-ass group forgot to add the episode title or some middle man screwed with the package. Maybe FB could even check to see if there's already an episode title and skip those files? However, that is icing on the cake, I can easily select the files missing ep titles manually.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Adding Episode Titel to Original Filename

Post by rednoah »

FileBot has no way of understanding your existing patterns, but it can easily identify the files and then rewrite the file paths using a custom format that just so happens to match your existing file names.

This should get you pretty close for a start:

Code: Select all

{n.space('.')}.{s00e00}.{t.space('.')}.{vf}{'.'+source}.{ac}{channels}.{vc}{'-'+group}
:idea: Please read the FAQ and How to Request Help.
loungebob
Posts: 3
Joined: 08 Jan 2019, 15:27

Re: Adding Episode Titel to Original Filename

Post by loungebob »

First, thanks for the quick reply.

Sadly this code kills, AMZN and the Group name. Both could be re-added/solved but it seems cumbersome to a layman like me.

You’re telling me, I cant point FB at let’s say position regex S\d\dE\d\d\. in my filename and have it insert the episode title, then just continue with the rest of the filename? That seems like a simpler way?
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Adding Episode Titel to Original Filename

Post by kim »

Code: Select all

{'.'+fn.match(/AMZN/).upper()}
Group:
viewtopic.php?f=5&t=4
loungebob
Posts: 3
Joined: 08 Jan 2019, 15:27

Re: Adding Episode Titel to Original Filename

Post by loungebob »

Thanks. But it’s AMZN this time. Next time it’s NF. Or HULU. And whathaveyou.

I come back to my original point, instead of working everything around the episode title and trying to recreate my original filename, why not just inject the episode name into my current, original file name.

I just tried Advanced Renamer and it can do that just fine using a regex expression to define the injection point in the original filename.
I much rather make FB part of my workflow though so, can it do this?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Adding Episode Titel to Original Filename

Post by rednoah »

Well, you have the {fn} binding so you have the filename and you can take bit and pieces however you see fit.

I suppose you could do something like this:

Code: Select all

{fn.after(/E\d{2}/)}
And just add that at the end after the normal name / numbers / title section.
:idea: Please read the FAQ and How to Request Help.
Post Reply