After TheTVDB's overhaul last fall, I've seen many new 'specials' added which shouldn't be there, often with prior year's one-offs or other non-series items, that cause the episodelist.airdate.year(min) field to bring in a year that is wrong.
I'm working on cleanup of those, but meantime, I've done an overhaul of my collection and found numerous series with incorrect premiere year references (i.e. Twilight Zone (1959) is pulling 1952 as the first year, because of a related episode back in 1952 now listed.)
What I want is to bring in the Season 1 Episode 1 airdate.year to use as my series baseline year - i.e. SERIES NAME (YEAR-of-S01E01).
Is there a way to explicitly pull out the year from a specific episode (S01E01) to then use as a reference field in the rest of my format?
Thanks.
Need to pull YEAR of S01E01 of a series
-
- Power User
- Posts: 89
- Joined: 01 Feb 2014, 16:59
Re: Need to pull YEAR of S01E01 of a series
viewtopic.php?f=8&t=6228&p=43413#p43413
Code: Select all
{episodelist.findAll{it.season == 1}.airdate.year.min()}
Code: Select all
{episodelist.find{it.season == 1 && it.episode == 1}.airdate.year}
Re: Need to pull YEAR of S01E01 of a series
{y} will give you the series start year as defined in the metadata for the series.
{sy} will give you the episode airdate interval for the season at hand, so {sy.min()} might work.
As a last resort, you can always filter the episodes you want / not want in your own code:
Code: Select all
{y}
{sy} will give you the episode airdate interval for the season at hand, so {sy.min()} might work.
Code: Select all
{sy.min()}
As a last resort, you can always filter the episodes you want / not want in your own code:
Code: Select all
{episodelist.find{ it.regular }.airdate.year}
-
- Power User
- Posts: 89
- Joined: 01 Feb 2014, 16:59
Re: Need to pull YEAR of S01E01 of a series
Thanks, kim & red - got me where I needed to be!~
Re: Need to pull YEAR of S01E01 of a series
thanks, this was very helpful. I hate that tvdb changed this, but with this I can work around thatkim wrote: ↑04 Apr 2020, 22:08 viewtopic.php?f=8&t=6228&p=43413#p43413
Code: Select all
{episodelist.findAll{it.season == 1}.airdate.year.min()}
Code: Select all
{episodelist.find{it.season == 1 && it.episode == 1}.airdate.year}