Adding Season name and adding "Part " prefix in episode name

Any questions? Need some help?
Post Reply
werrpy
Posts: 1
Joined: 07 Sep 2021, 09:55

Adding Season name and adding "Part " prefix in episode name

Post by werrpy »

Hello,

I am using my own preset to rename TV series and so far it worked fine but there are two things I still couldn't figure it out.

One is Adding Season title to filename and other is adding prefix of "Part " to multi-part (multipart) episodes

Ex: I want "Power.Rangers.S04E01.A.Zeo.Beginning.1.NTSC.DVD.DD.2.0.MPEG-2.REMUX-WEE" to be renamed to

"Power.Rangers.Zeo.S04E01.A.Zeo.Beginning.Part.1.NTSC.DVD.DD.2.0.MPEG-2.REMUX-WEE"

The preset I am using is "{allOf{n.upperInitial()}{S00e00}{t.upperInitial()}.join('.').space('.').replace("'", "").replace(",", "").replace("&", "And")replace("(", "").replace(")", "").replacePart(', Part $1')}.NTSC.DVD.DD.2.0.MPEG-2.REMUX-WEE "


I have tried ".replacePart(', Part $1')", {if (dc > 1) " Part $di"} for adding Part prefix but it doesn't work. And regarding adding season title I couldn't even find anything.

Help is appreciated
User avatar
rednoah
The Source
Posts: 20061
Joined: 16 Nov 2011, 08:59

Re: Adding Season name and adding "Part " prefix in episode name

Post by rednoah »

1.
There are no bindings for season titles (e.g. Season 4 - Zeo) in FileBot at this point in time, because TheTVDB introduced this feature rather recently:
https://www.thetvdb.com/series/power-ra ... official/4


EDIT:

FileBot r8781 now supports season names and adds the {sn} season name binding to the format engine. (NOTE: support for season names is currently limited to TheMovieDB::TV)



2.
The String.replacePart() method can be used to transform A Zeo Beginning (1) as desired:

Code: Select all

{ t.replacePart(', Part $1') }

Code: Select all

A Zeo Beginning, Part 1
:!: Note that you must apply String.replacePart() before you replace (1) with 1. The number alone without parentheses is not a recognized multi-part pattern.
:idea: Please read the FAQ and How to Request Help.
Post Reply