y series/movie year 2009: is it the production year?

All about user-defined episode / movie / file name format expressions
Post Reply
Biff
Posts: 241
Joined: 02 Mar 2014, 17:52

y series/movie year 2009: is it the production year?

Post by Biff »

y series/movie year 2009: is it the production year of a movie / series? If, no, what is the right variable?
Newest portable, stable FileBot, Windows 10 Home, 64bit
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: y series/movie year 2009: is it the production year?

Post by rednoah »

Yes
:idea: Please read the FAQ and How to Request Help.
Biff
Posts: 241
Joined: 02 Mar 2014, 17:52

Re: y series/movie year 2009: is it the production year?

Post by Biff »

Thank you, rednoah,

It appears, that this year (y) is not scrapeable often, this field often stays empty. So, which year / date you actually should have when you rename a file, so you can let the right information be scraped? I use the airdate.
Newest portable, stable FileBot, Windows 10 Home, 64bit
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: y series/movie year 2009: is it the production year?

Post by rednoah »

Movie mode:
{y} is always available. Name/Year is always available as basic movie information, and at least one ID of TheMovieDB or IMDb.

Episode mode:
{y} is equivalent to {seriesStartDate.year} and may or may not be available depending on the datasource and data available. Same applies to {airdate} which is optional as well.
:idea: Please read the FAQ and How to Request Help.
Biff
Posts: 241
Joined: 02 Mar 2014, 17:52

Re: y series/movie year 2009: is it the production year?

Post by Biff »

Thank you very much, rednoah.
Episode mode:
{y} is equivalent to {seriesStartDate.year} and may or may not be available depending on the datasource and data available. Same applies to {airdate} which is optional as well.
So - as you need a date / year (if I am right) the best would be just to try out which of these items are available, I assume, before renaming. So you have to change the renaming sets and use that one with the best data, I would say.
Newest portable, stable FileBot, Windows 10 Home, 64bit
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: y series/movie year 2009: is it the production year?

Post by rednoah »

Depends on what you want. You can easily have logic like, "if airdate not defined then use seriesStartDate" but does that make any sense? Those two fields could be years apart.

If you find TheTVDB entries where data is missing, just open TheTVDB and enter the data yourself so it'll be available for others in the future. ;)
:idea: Please read the FAQ and How to Request Help.
Biff
Posts: 241
Joined: 02 Mar 2014, 17:52

Re: y series/movie year 2009: is it the production year?

Post by Biff »

Actually I want the names for the files to be renamed most likely are the right ones, but it seems to be not that easy to approach. So equivalently to the movie year, which one should I use for series, this one, I assume: {seriesStartDate.year}. And when it is not available add it to TVDB. Is that OK?
Newest portable, stable FileBot, Windows 10 Home, 64bit
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: y series/movie year 2009: is it the production year?

Post by rednoah »

Well, you can use {y} cause that's the same as {seriesStartDate.year} jus to make it shorter. And if it's missing you'll need to add the missing data, wait 1-2 days, do CTRL-SHIFT-DEL in FileBot to delete cache, and then it should work. ;)
:idea: Please read the FAQ and How to Request Help.
Biff
Posts: 241
Joined: 02 Mar 2014, 17:52

Re: y series/movie year 2009: is it the production year?

Post by Biff »

Good, so I will do it, thank you very much.

By the way, how could I do it:
You can easily have logic like, "if airdate not defined then use seriesStartDate" but does that make any sense?
Newest portable, stable FileBot, Windows 10 Home, 64bit
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: y series/movie year 2009: is it the production year?

Post by rednoah »

Code: Select all

{episode.airdate ?: episode.seriesStartDate}
:idea: Please read the FAQ and How to Request Help.
Biff
Posts: 241
Joined: 02 Mar 2014, 17:52

Re: y series/movie year 2009: is it the production year?

Post by Biff »

Thank you very much, rednoah.

Is there a manual or something like that, where I could find anything about this?
Newest portable, stable FileBot, Windows 10 Home, 64bit
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: y series/movie year 2009: is it the production year?

Post by rednoah »

It's just Groovy code:
http://groovy.codehaus.org/

With some predefined variables:
http://www.filebot.net/naming.html
:idea: Please read the FAQ and How to Request Help.
Biff
Posts: 241
Joined: 02 Mar 2014, 17:52

Re: y series/movie year 2009: is it the production year?

Post by Biff »

Ah, thank you, I once had found those variables, but then...

Is it possible to do that: use {y} but when {y} is not available use {seriesStartDate.year} and when {seriesStartDate.year} is not available use {episode.airdate}?

Does {y} display the starting year of the episode or the first episode of a season or the first episode ever? So, as {y} is the same as {seriesStartDate.year} it will be the year the episode is produced or the first time broadcasted. Ah no, {episode.airdate} and {y} should be the same then...or...I am confused...to many dates...years...
Newest portable, stable FileBot, Windows 10 Home, 64bit
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: y series/movie year 2009: is it the production year?

Post by rednoah »

{seriesStartDate.year} is exactly the same as {y} for Episode expressions. The {seriesStartDate} and {airdate} variables depend on what is entered on TheTVDB, one on the series level, one on the airdate level, so they could be different.
:idea: Please read the FAQ and How to Request Help.
Biff
Posts: 241
Joined: 02 Mar 2014, 17:52

Re: y series/movie year 2009: is it the production year?

Post by Biff »

OK then.

So, could one make it like this: If {seriesStartDate.year} is available use it, if not use {y}, if {y} is not available use {seriesStartDate} and if it is not available use {airdate}?

Do you think, that might be a good way?
Newest portable, stable FileBot, Windows 10 Home, 64bit
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: y series/movie year 2009: is it the production year?

Post by rednoah »

Sure, just the other way around:

Code: Select all

{episode.seriesStartDate?.year ?: episode.airdate}
episode.seriesStartDate really really is the same as y...
:idea: Please read the FAQ and How to Request Help.
Biff
Posts: 241
Joined: 02 Mar 2014, 17:52

Re: y series/movie year 2009: is it the production year?

Post by Biff »

Yes, sorry, of course I believe you, no question...but so many dates do confuse me, sorry again.

And thank your very much.
Newest portable, stable FileBot, Windows 10 Home, 64bit
Post Reply