Page 1 of 1
Naming TV shows
Posted: 26 Feb 2018, 08:59
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.
Re: Naming TV shows
Posted: 26 Feb 2018, 11:07
by rednoah
Isn't that what s00 gives you by default? What have you tried so far?
Re: Naming TV shows
Posted: 26 Feb 2018, 12:33
by Thrane
I can't use s00, it says "Binding "s00": undefined
Re: Naming TV shows
Posted: 26 Feb 2018, 17:46
by kim
it's
or
Code: Select all
{n} - {s.pad(2)+'x'+e.pad(2)} - {t}
NOT
BTW:
=
Firefly - 1x01 - Serenity
=
Firefly - 01x01 - Serenity
does
.pad(2)
do nothing or why not pad the season part also ?
Re: Naming TV shows
Posted: 27 Feb 2018, 05:04
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.

I highly recommend just using
{s00e00} which implicitly takes care of many corner cases you might not have thought of.
Re: Naming TV shows
Posted: 27 Feb 2018, 08:58
by Thrane
Thanbk you so much, I'll play around a bit - and may end up using {s00e00}, I just prefer the x

Re: Naming TV shows
Posted: 27 Feb 2018, 09:06
by rednoah
Does this make sense to you?
Code: Select all
{s00e00.replace('S', '').replace('E', 'x')}
Re: Naming TV shows
Posted: 27 Feb 2018, 20:17
by Thrane
It does - perfect!
Thank you
