[Emby] Removing Duplicate Years When Show Has Them
Posted: 30 Sep 2020, 05:15
Thank you for the help.
Right now I have this for my renaming (Open to suggestions on improving anything).
It works fine for regular shows and fine for shows with past dates for specials, like Tales From The Crypt (It lists as 1989 instead of 1972). It also appears to work fine for future seasons.
The problem I am having is I hit something like Teachers (2016 or Roots (2016) and I end up with a double year.
I have kind of just pieced that together from various forum posts on here, only brought on by the combo of the year handling change by TVDB and the combo platter of wanting more accurate Emby guesses when scanning in new stuff.
Is there some sort of way to take
and turn it into some sort of don't add if the date is already available as part of the filename?
To be clear, I want the show name to include the date of the first year the show actually aired, not the earlier special years. I don't want a double date to show, though, if the show already has a date attached.
If I am doing anything wrong even prior to that, please let me know. This is my first time doing anything even the least bit difficult in the program, so I am a bit lost.
I appreciate any help. Thank you.
Right now I have this for my renaming (Open to suggestions on improving anything).
Code: Select all
{n}{n =~ {episodelist.findAll{it.season}.airdate.year.min()} ? '' : " (${episodelist.findAll{it.season}.airdate.year.min()})"}/{'Season '+s}/{n}{n =~ {episodelist.findAll{it.season}.airdate.year.min()} ? '' : " (${episodelist.findAll{it.season}.airdate.year.min()})"} - {s00e00} - {t} ({airdate.format('MMMM dd, yyyy')})
The problem I am having is I hit something like Teachers (2016 or Roots (2016) and I end up with a double year.
I have kind of just pieced that together from various forum posts on here, only brought on by the combo of the year handling change by TVDB and the combo platter of wanting more accurate Emby guesses when scanning in new stuff.
Is there some sort of way to take
Code: Select all
{n}{n =~ {episodelist.findAll{it.season}.airdate.year.min()} ? '' : " (${episodelist.findAll{it.season}.airdate.year.min()})"}
To be clear, I want the show name to include the date of the first year the show actually aired, not the earlier special years. I don't want a double date to show, though, if the show already has a date attached.
If I am doing anything wrong even prior to that, please let me know. This is my first time doing anything even the least bit difficult in the program, so I am a bit lost.
I appreciate any help. Thank you.