AMC - Issue with TV Show having multiple results at TVDB

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
werkkrew
Posts: 7
Joined: 25 Apr 2013, 17:32

AMC - Issue with TV Show having multiple results at TVDB

Post by werkkrew » 30 Apr 2013, 14:41

I am not sure if this is a bug or something I can work around using better parameters but here is my situation:

I have Filebot running on a Synology NAS DS212j and it is being triggered through a script which transmission calls at the end of each download. This is sort of irrelevant though as running FileBot alone, with the AMC script or TV artwork script will yield the same result.

A currently running show called "Touch", when searched for on the TVDB yields many results, the show we want is not the first result - which is fine, for example:

http://thetvdb.com/?string=touch&search ... ion=Search

The show we want is listed as "Touch (2012)"

I have tried numerous things to get this working and the only thing you can do is either name the folder the episodes are in "Touch (2012)" or use --query "Touch (2012)" which is great and filebot finds the right show. The issue is, if you use the year in your folder naming convention as I do filebot will rename the show to have a folder like: "Touch (2012) (2012)", every time.

Again, I am not sure if this is a bug or not but I need some way around it because every time a new episode is downloaded filebot is putting the show in the wrong folder and I have to manually move it around and fix my XBMC library.

I suppose one solution would be to remove the year from my TV Show folder naming convention such that only this show in particular would be listed with a year - and if that is the solution I am willing to do that but this certainly seems to me that its a bug which could be fixed.

Here is the code I am using to call AMC.groovy

Code: Select all

filebot -script fn:amc \ 
--output "/volume1/videos" \
--log-file /volume1/scripts/transmission/filebot-amc.log \
--action $action \
--conflict override \
-non-strict \
--def \
music=n \
subtitles=n \
artwork=y \
xbmc=xxx \
gmail=xxx \
clean=$clean \
"ut_dir=$TR_DIR" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME" \
"seriesFormat=TV Shows/{n} ({y})/{episode.special ? 'Season 0' : 'Season '+s}/{n}.{episode.special ? 'S00E'+special.pad(2) : s00e00}.{t}" \
"animeFormat=Anime/{n}/{n}.S{(episode.season ? s : 1).pad(2)}E{e.pad(2)}.{t}" \
"movieFormat=Movies/{n} ({y})/{n} ({y})"

User avatar
rednoah
The Source
Posts: 16812
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC - Issue with TV Show having multiple results at TVDB

Post by rednoah » 30 Apr 2013, 14:53

The show is listed as "Touch (2012)" so that's what {n} returns. It's the unique name of the show.

If you know you'll add the year anyway, just removed it from the value of {n}

Code: Select all

n.replaceAll(/[(][0-9]{4}[)]/)
or

Code: Select all

n.replaceTrailingBrackets()
But that's gonna get rid of (US/UK) as well.
:idea: Please read the FAQ and How to Request Help.

werkkrew
Posts: 7
Joined: 25 Apr 2013, 17:32

Re: AMC - Issue with TV Show having multiple results at TVDB

Post by werkkrew » 30 Apr 2013, 15:04

Yeah that's what thetvdb says it is to disambiguate it from the other show Touch but the actual show is not called "Touch (2012)", however I do not expect your script to be able to know that.

How could I integrate your suggested changed into my automation so that it can handle shows like this without breaking how it handles the other shows?

User avatar
rednoah
The Source
Posts: 16812
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC - Issue with TV Show having multiple results at TVDB

Post by rednoah » 30 Apr 2013, 15:08

I already gave you the solution. Play with it in the Format Editor GUI. The value of n is Touch 2012, so you just process the value of n and remove the 2012 part.
:idea: Please read the FAQ and How to Request Help.

werkkrew
Posts: 7
Joined: 25 Apr 2013, 17:32

Re: AMC - Issue with TV Show having multiple results at TVDB

Post by werkkrew » 30 Apr 2013, 15:12

I'll try to get a GUI up and see what I can come up with and post back with my results. Thanks rednoah.

Post Reply