Airdate value (season year) stays empty

All about user-defined episode / movie / file name format expressions
Post Reply
hasakona
Posts: 2
Joined: 15 Nov 2023, 18:31

Airdate value (season year) stays empty

Post by hasakona »

Hello,
i've been using the following expression for years, recently the Season Year/Airdate stopped working.

Instead of

Code: Select all

Series, The/Season 01 (SeasonYear)/SeriesName - S00E00 - EpisodeName [Resolution, Source, Codec]

the statement now returns the following with the SeasonYear remaining empty

Code: Select all

Series, The/Season 01 ()/SeriesName - S00E00 - EpisodeName [Resolution, Source, Codec]
I'd appreciate any hint as to why the value doesn't work anymore or how i can fix/replace/remove it.

The statement is as follows

Code: Select all

N:/{n.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).colon(' - ')}/{'Season '+s.pad(2)} ({episodelist.findAll{ it.season == s }.airdate.year.min()})/{n} - {s00e00} - {t} [{vf}{', '+source}{', '+vc}]{subt}
Thanks!
User avatar
rednoah
The Source
Posts: 23000
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Airdate value stays empty

Post by rednoah »

:arrow: You can use the {sy} season year binding:

Format: Select all

{ sy }

Format: Select all

{ sy.min() }
:arrow: https://www.filebot.net/naming.html#sy
:idea: Please read the FAQ and How to Request Help.
hasakona
Posts: 2
Joined: 15 Nov 2023, 18:31

Re: Airdate value (season year) stays empty

Post by hasakona »

Thank you so much!
GeorgeAl
Posts: 19
Joined: 17 Apr 2020, 17:43

Re: Airdate value (season year) stays empty

Post by GeorgeAl »

I have the same problem.

My present is

Format: Select all

D:/WD/Series/{n.replaceTrailingBrackets()} ({episodelist.airdate.year.bounds().join ('-')})  /Season {sy.min() } ({episodelist.findAll{it.season == s}.airdate.year.min()}) / {n} - {sxe} - {t}
.

Where do I have to snack in the

Format: Select all

{ sy. min() }
to works?
User avatar
rednoah
The Source
Posts: 23000
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Airdate value (season year) stays empty

Post by rednoah »

You can put it wherever you want it to appear in the file path:

Format: Select all

{n}/Season {sy.min()}/{n} - {sxe} - {t}

Code: Select all

Firefly/Season 2002/Firefly - 1x01 - Serenity



:idea: It's essentially just a replacement pattern, you replace all the {...} with values and then you get the file path for any given episode:

Screenshot
:idea: Please read the FAQ and How to Request Help.
GeorgeAl
Posts: 19
Joined: 17 Apr 2020, 17:43

Re: Airdate value (season year) stays empty

Post by GeorgeAl »

So, to achieve the format :

Path/Tv Show Name (Duration)/Season Numaber (Year/s)/TV Show name - Season NumberxEpisode Namuber - Episode Name I have to use this preset:

D:/WD/Series/{n.replaceTrailingBrackets()} ({episodelist.airdate.year.bounds().join ('-')}) /Season {sy.min() } ({episodelist.findAll{it.season == s}.airdate.year.min()}) / {n} - {sxe} - {t} ?

E.G. D:/WD/Series/Dr. Stone (2019-2023)/Season 3(2023)/Dr. Stone - 3x25 - Name of Episode
User avatar
rednoah
The Source
Posts: 23000
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Airdate value (season year) stays empty

Post by rednoah »

{s} is the season number. {sy} is the season years. If you want both, then you need to use both:

Format: Select all

Season {s} ({sy.min()})


Hence:

Format: Select all

D:/WD/Series
/{n.replaceTrailingBrackets()} ({episodelist.airdate.year.bounds().join('-')})
/Season {s} ({sy.min()})
/{n} - {sxe} - {t}


:idea: You will want to use the Format Editor for instant feedback on what your proposed format might do or not do:
Screenshot
:idea: Please read the FAQ and How to Request Help.
GeorgeAl
Posts: 19
Joined: 17 Apr 2020, 17:43

Re: Airdate value (season year) stays empty

Post by GeorgeAl »

Thank you. I see my mistake.

Have a lovely Christmas!
Post Reply