AMC Script Mismatch

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
TehJonny
Posts: 19
Joined: 13 Feb 2016, 00:45

AMC Script Mismatch

Post by TehJonny »

Hey,

Almost there in getting my media center fully automated thanks to FileBot so :) +RedNoah

Just wondering how I can make sure its the correct show that is getting renamed with some shows it will match them to the wrong show on TheTVDB such as "The Magicians (2015)"

I was wondering if there is some sort of filter I could use but I don't just download the latests episodes I download old shows too :(

Is there any sort of command I can run to say if "The Magicians = The Magicians (2015)"

Currently getting this in my log.

Code: Select all

Run script [fn:amc] at [Tue Feb 16 23:38:54 GMT 2016]
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = n
Parameter: clean = y
Parameter: ut_label = TVShows
Parameter: ut_state = 20
Parameter: ut_title = The.Magicians.S01E05.720p.HDTV.x264-AVS[rarbg]
Parameter: ut_kind = multi
Parameter: ut_file = RARBG.com.txt
Parameter: ut_dir = D:\Jonny's Stuff\Downloads\Complete\The.Magicians.S01E05.720p.HDTV.x264-AVS[rarbg]
Parameter: seriesFormat = /TVShows/{n}\{'Season '+s}\{n} - {sxe} - {t}
Input: D:\Jonny's Stuff\Downloads\Complete\The.Magicians.S01E05.720p.HDTV.x264-AVS[rarbg]\The.Magicians.S01E05.720p.HDTV.x264-AVS.mkv
Exclude: D:\Jonny's Stuff\Downloads\Complete\The.Magicians.S01E05.720p.HDTV.x264-AVS[rarbg]\RARBG.com.txt
Exclude: D:\Jonny's Stuff\Downloads\Complete\The.Magicians.S01E05.720p.HDTV.x264-AVS[rarbg]\the.magicians.s01e05.720p.hdtv.x264-avs.nfo
Group: [tvs:the magicians] => [The.Magicians.S01E05.720p.HDTV.x264-AVS.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [The Magicians]
Fetching episode data for [The Magicians]
Fetching episode data for [The Magician's Hat]
Fetching episode data for [The Magicians (2015)]
Fetching episode data for [The Magician's House]
[TEST] Rename [D:\Jonny's Stuff\Downloads\Complete\The.Magicians.S01E05.720p.HDTV.x264-AVS[rarbg]\The.Magicians.S01E05.720p.HDTV.x264-AVS.mkv] to [D:\Jonny's Stuff\TVShows\The Magicians\Season 1\The Magicians - 1x05 - Episode 5.mkv]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ
As You can see from the above its choosing The Magicians rather then the 2015 version

Any helps will be great.

Kind Regards
-Jonny
User avatar
rednoah
The Source
Posts: 22971
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC Script Mismatch

Post by rednoah »

You can explicitly exclude certain shows. The --filter examples include this exact use case.

I recommend using the age filter in combination with some label like "Running" so that the filter is only applies if that label is set.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: AMC Script Mismatch

Post by kim »

PreRename.groovy (run before e.g. AMC script)

Code: Select all

// Rename Magicians to Magicians (2015)
rename(map: args.getFolders()
	.findAll{ it.name =~ '(?i:The.Magicians)' }.each{println "FOUND: $it.name"}	
		.collectEntries{
			[it, it.name.replaceFirst('(?i:The.Magicians)', 'The Magicians (2015)')]
		}
)
or

Code: Select all

// Rename Magicians to Magicians (2015)
rename(map: args.getFiles()
	.findAll{ it.name =~ '(?i:The.Magicians)' }.each{println "FOUND: $it.name"}	
		.collectEntries{
			[it, it.name.replaceFirst('(?i:The.Magicians)', 'The Magicians (2015)')]
		}
)
or if added to the list i think it will work to ?
User avatar
rednoah
The Source
Posts: 22971
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC Script Mismatch

Post by rednoah »

1.
So you're pre-renaming it to The Magicians (2015) to make it work better? Any reason why you're not using a --filter rule to exclude The Magicians instead?

You could also use the --filter as a white list, e.g. "only accept shows where Media/TV Shows already contains a folder that is named exactly after that show". That way you could force it to process as The Magicians (2015) by creating a folder called The Magicians (2015). You can do the white list as text file as well of course.


2.
if added to the list i think it will work to ?
I don't know. I'd need the filenames to try this myself.


3.
Your pre-rename scripts seem to do pretty much exactly the same as the Filename: Find & Replace script:
viewtopic.php?f=4&t=5#p2100
:idea: Please read the FAQ and How to Request Help.
Post Reply