Page 1 of 1
Using {s.pad(2)} does not yield results when s=0
Posted: 11 Jan 2020, 14:43
by the1337moderate
As a continuation to
this previous thread. Using the code block
{s.pad(2)} doesn't seem to work if the season value is
0. Using FileBot 4.8.5
Example
Code: Select all
D:\TV Shows\{n} ({y})/Season {s.pad(2)}/{n} ({y}) - {s00e00} - {t}
will give this output:
Code: Select all
D:\TV Shows\30 Rock (2005)\Season \30 Rock (2005) - S00E03 - Live from Studio 6H (West Coast).mkv
Re: Using {s.pad(2)} does not yield results when s=0
Posted: 11 Jan 2020, 14:46
by rednoah
{s} is never 0. You are probably referring to specials. Please check the Plex naming scheme example on how to do conditional formatting to get specials into Season 00 folders.
Re: Using {s.pad(2)} does not yield results when s=0
Posted: 12 Jan 2020, 00:42
by kim
Television Specials
Shows sometimes air “specials” or other content that isn’t part of the standard season. “Specials” episodes are always part of season zero (i.e. season number “00”) and should be placed inside a folder named either Season 00 or Specials.
/TV Shows/ShowName/Specials/ShowName – s00e13 – Optional_Info.ext
Where you specify the correct episode numbers. If you’re unsure whether a particular episode is a Special or not, check the episode on TheTVDB and name it as you see it there.
If an “episode” you have doesn’t appear in TheTVDB (e.g. DVD Specials or goof reel), place this content in the Season 00 or Specials folder named using s00eYY using a false “YY” number (e.g.: Heroes s00e99). The show will be available to play in a Plex App but won’t have any special metadata gathered, such as a summary.
https://support.plex.tv/articles/naming ... how-files/
Re: Using {s.pad(2)} does not yield results when s=0
Posted: 12 Jan 2020, 00:44
by kim
This is what you want:
Code: Select all
{'/'+any{"Season ${s.pad(2)}"}{'Season 00'}}
Code: Select all
{ny}{'/'+any{"Season ${s.pad(2)}"}{'Season 00'}}{'/'+ny}{' - '+s00e00}{' - '+t}
or if multi episode
Code: Select all
{ny}{'/'+any{"Season ${s.pad(2)}"}{'Season 00'}}{'/'+ny}{' - '+(regular ? episodes.collect{ 'S'+[it.season, it.episode]*.pad(2).join('E') }.join('-') : episodes.collect{ ['S00', it.special]*.pad(2).join('E') }.join('-'))}{' - '+t}
output:
30 Rock (2005)/Season 00/30 Rock (2005) - S00E03 - Live from Studio 6H (West Coast)
Re: Using {s.pad(2)} does not yield results when s=0
Posted: 12 Jan 2020, 09:38
by rednoah
e.g. here's an example from the
{plex} format page:
Code: Select all
{n}/{episode.special ? 'Specials' : 'Season '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t}
viewtopic.php?t=4116

Just replace
'Specials' with
'Season 00' and you're good.