noob question, add year to series name

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
doainwpg
Posts: 1
Joined: 08 Dec 2019, 21:08

noob question, add year to series name

Post by doainwpg »

I've searched and can't seem to find what i'm looking for. is there a way to modify the formatting in the amc script to add the year to the series name. So instead of finding and making a folder named "Watchmen" it creates a folder "Watchmen (2019)"?
User avatar
rednoah
The Source
Posts: 23935
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: noob question, add year to series name

Post by rednoah »

Yes, the {ny} name/year binding will do that for you:

Code: Select all

{ny}
:idea: Please read the FAQ and How to Request Help.
andcbii
Posts: 5
Joined: 04 Apr 2025, 18:33

Re: noob question, add year to series name

Post by andcbii »

what if you want an alias/alternative title? I used this:

Code: Select all

{alias[0]}{' ('}{y}{')'}
Just wondering if there's a better way.
User avatar
rednoah
The Source
Posts: 23935
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: noob question, add year to series name

Post by rednoah »

I'd rewrite the parenthesis at the very least:

Format: Select all

{alias[0]} ({y})
:idea: Note that alias[0] is not a specific alias name. If you test this format on many movies / shows then you will find that you sometimes don't get the alias name you want. I'd probably use something more predictable like primaryTitle which gives you the movie / series name in the original language.
:idea: Please read the FAQ and How to Request Help.
andcbii
Posts: 5
Joined: 04 Apr 2025, 18:33

Re: noob question, add year to series name

Post by andcbii »

Thanks for the tip on the parenthesis. Primary Title didn't return the name I wanted for the TV show. I think the TMDB page is "wrong".
User avatar
rednoah
The Source
Posts: 23935
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: noob question, add year to series name

Post by rednoah »

andcbii wrote: 04 Apr 2025, 20:21 Primary Title didn't return the name I wanted for the TV show.
:?: Which name do you want for which TV series?
:idea: Please read the FAQ and How to Request Help.
andcbii
Posts: 5
Joined: 04 Apr 2025, 18:33

Re: noob question, add year to series name

Post by andcbii »

This is the show:

https://www.themoviedb.org/tv/4241-8-si ... e-daughter

I wanted the original title, which TMDB has listed as an alt "8 Simple Rules... for Dating My Teenage Daughter. They have the original name as "8 Simple Rules" which is what the show was renamed to in season 3.
User avatar
rednoah
The Source
Posts: 23935
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: noob question, add year to series name

Post by rednoah »

:idea: 8 Simple Rules... for Dating My Teenage Daughter happens to be the last item in the list:

Code: Select all

[8 прости правила, 8 Simple Rules ..., A Few Simple Rules, Few Simple Rules, 8 jednoduchých pravidiel, 8 Regrinhas Básicas... para Namorar Minhas Filhas Adolescentes, 8 reguli simple, 8 semplici regole... per uscire con mia figlia, 8 простых правил для друга моей дочери-подростка, 8 простых правил для друга моей дочериподростка, Meine wilden Töchter, Meine wilden Toechter, No con mis hijas, Pimaszok, avagy kamaszba nem üt a mennykő, Pimaszok avagy kamaszba nem uet a mennykő, Teinitytön kasvatusopas, Teinitytoen kasvatusopas, Touche pas à mes filles, Осем прости правила, 八项注意之泡我女儿没那么容易, 8 Simple Rules for Dating My Teenage Daughter, 8 Simple Rules... for Dating My Teenage Daughter]
so this will work in this specific instance:

Format: Select all

{ alias[-1] }
:!: That said, the name you want is probably the last element by happenstance, not by design, so { alias[-1] } will likely not work for other shows.




:arrow: In general, you'll want to follow the Use Custom Series Names / Force Series Name / Hardcode Series Name guide and choose from one of the various approaches.

e.g. use character replacement

Format: Select all

{
	n.replace(
		'8 Simple Rules' : '8 Simple Rules... for Dating My Teenage Daughter',
	)
}
:idea: Please read the FAQ and How to Request Help.
Post Reply