Series' not picking up the Year?

All about user-defined episode / movie / file name format expressions
Post Reply
User avatar
J. Scott Elblein
Posts: 37
Joined: 11 Jul 2014, 06:57

Series' not picking up the Year?

Post by J. Scott Elblein »

I've been noticing an issue lately, when naming TV Series'. It seems that FB will pick up the first year it finds for that show, then use it for the Year for all subsequent files. For example, my girlfriend ;) grabbed The Simple Life, and I'm trying to use FB to name everything the way I like it; it's 5 Seasons long, with the first show starting in 2003, and the final show ending in 2007. What FB is doing is, using 2003 for all files now, instead of the proper years for each episode.

Screenshot:
Image

The rename code I use is:

Code: Select all

Z:/Media Server/Unsorted/TV/{n.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}\{episode.special ? 'Season 00' : "Season ${s.pad(2)}"}\{n.upperInitial().lowerTrail().replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)} - {episode.special ? 's00e'+special.pad(2) : s00e00.lower()} - ({y}) - {t.upperInitial().lowerTrail().replaceAll(/\b[IiVvXx]+\b/, {it.upper()})} - [{sdhd} {vf} {vc} {resolution}] [{ac} {af}]
And I have it set to pull from TheTVDB. I confirmed that on TheTVDB itself, the years aren't all 2003, just to be sure it wasn't a website issue: Link

The version of FB I currently use is: FileBot 4.6.1 (r3270)

Any idea why this might be?
User avatar
rednoah
The Source
Posts: 24036
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Series' not picking up the Year?

Post by rednoah »

{y} is short for {series.startDate.year}. You are looking for {airdate.year} instead.

FYI: You can replace {n.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)} with {n.sortName('$2, $1')} if you want.
:idea: Please read the FAQ and How to Request Help.
User avatar
J. Scott Elblein
Posts: 37
Joined: 11 Jul 2014, 06:57

Re: Series' not picking up the Year?

Post by J. Scott Elblein »

Ahhaaaaaaaa! Thank you! :oops: :lol:

Hey, quick side question; Here's the Movie code that I use, is there a way to have it detect if the file is a ".srt" sub, and if it is, change it to ".eng.srt"?

Code: Select all

Z:/Media Server/Unsorted/Movies/{collection.sortName('$2, $1').replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´‘’?""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ")}/{norm = {it.upperInitial().lowerTrail().replaceAll(/\b\.$/, '').replaceTrailingBrackets().replaceAll(/[`´‘’?""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, {it.upper()}).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, {it.lower()}).sortName('$2, $1')}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}/{norm(n)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}){' - pt'+pi} {' ('+fn.matchAll(/theatrical|extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition|open.matte|collectors.edition|colorized|b&w/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ")+')'} - [{sdhd} {vf} {vc} {resolution}] [{ac} {af}]
User avatar
rednoah
The Source
Posts: 24036
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Series' not picking up the Year?

Post by rednoah »

Here's help with adding language tags, or doing some basic language detection:
viewtopic.php?f=8&t=2726&p=15385#p15388
:idea: Please read the FAQ and How to Request Help.
Post Reply