Naming TV shows

All about user-defined episode / movie / file name format expressions
Post Reply
Thrane
Posts: 4
Joined: 26 Feb 2018, 08:56

Naming TV shows

Post by Thrane »

Hi

Pretty new to this, but how can I get sthis to work:
{n} - {s00}x{e00} - {t}

I would like the season to consist of 2 numbers: 01, 02 etc.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Naming TV shows

Post by rednoah »

Isn't that what s00 gives you by default? What have you tried so far?
:idea: Please read the FAQ and How to Request Help.
Thrane
Posts: 4
Joined: 26 Feb 2018, 08:56

Re: Naming TV shows

Post by Thrane »

I can't use s00, it says "Binding "s00": undefined
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Naming TV shows

Post by kim »

it's

Code: Select all

{n} - {s00e00} - {t}
or

Code: Select all

{n} - {s.pad(2)+'x'+e.pad(2)} - {t}

Code: Select all

{n} - {s.pad(2)}x{e.pad(2)} - {t}
NOT

Code: Select all

{n} - {s00}x{e00} - {t}

BTW:

Code: Select all

{sxe.pad(2)}
=
Firefly - 1x01 - Serenity

Code: Select all

{sxe.pad(5)}
=
Firefly - 01x01 - Serenity

does
.pad(2)
do nothing or why not pad the season part also ?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Naming TV shows

Post by rednoah »

1.
1x01 is a 4 character String, and thus only String.pad(5) will add a 0 in front of that String.


2.
{s.pad(2)} {e.pad(2)} will give you 2-character padded values for any Integer / String value. However, you will loose support for formatting multi-part episodes and specials.

:idea: I highly recommend just using {s00e00} which implicitly takes care of many corner cases you might not have thought of.
:idea: Please read the FAQ and How to Request Help.
Thrane
Posts: 4
Joined: 26 Feb 2018, 08:56

Re: Naming TV shows

Post by Thrane »

Thanbk you so much, I'll play around a bit - and may end up using {s00e00}, I just prefer the x :-)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Naming TV shows

Post by rednoah »

Does this make sense to you?

Code: Select all

{s00e00.replace('S', '').replace('E', 'x')}
:idea: Please read the FAQ and How to Request Help.
Thrane
Posts: 4
Joined: 26 Feb 2018, 08:56

Re: Naming TV shows

Post by Thrane »

It does - perfect!
Thank you :-)
Post Reply