Page 1 of 1

Script not matching UFC

Posted: 27 Mar 2015, 19:14
by Corbula
I've been messing around with amc for a while and it works great with TV and movies, however I want it to work the same with UFC. It should match it as a movie as TMDB has UFC on there but for some reason it doesn't. I also want it to move it to a different folder if it contains UFC in the name. I've tried that in the script below, I know it's probably wrong but it's not getting matched in the first place.

The script i'm testing at the moment is this.

Code: Select all

filebot -script fn:amc --output "E:\Users\[i]username[/i]\Videos" --log-file amc.log --action test --conflict override -non-strict --def music=y subtitles=en "seriesFormat=E:/Users/[i]username[/i]/Videos/TV/{n}/Season {+s}/{n} - {sxe} - {t} " "movieFormat=E:/Users/[i]username[/i]/Videos/Movies/ {n} ({y})/{n} ({y}) : {fn =~ /UFC/ ? } E:/Users/[i]username[/i]/Videos/UFC/{n}" "ut_label=Movie" "ut_state=5" "ut_title=UFC Fight Night 62 Maia vs LaFlare 2015 03 21 HDTV x264-NWCHD -={SPARROW}=-" "ut_kind=%K" "ut_file=" "ut_dir=E:\Users\[i]username[/i]\Downloads\utorrent RSS\Complete\UFC Fight Night 62 Maia vs LaFlare 2015 03 21 HDTV x264-NWCHD -={SPARROW}=-"
When I run this the log gives me this.

Code: Select all

Parameter: music = y
Parameter: subtitles = en
Parameter: seriesFormat = E:/Users/[i]username[/i]/Videos/TV/{n}/Season {+s}/{n} - {sxe} - {t}
Parameter: movieFormat = E:/Users/[i]username[/i]/Videos/Movies/ {n} ({y})/{n} ({y}) : {fn =~ /UFC/ ? } E:/Users/[i]username[/i]/Videos/UFC/{n}
Parameter: ut_label = Movie
Parameter: ut_state = 5
Parameter: ut_title = UFC Fight Night 62 Maia vs LaFlare 2015 03 21 HDTV x264-NWCHD -={SPARROW}=-
Parameter: ut_kind = %K
Parameter: ut_file = 
Parameter: ut_dir = E:\Users\[i]username[/i]\Downloads\utorrent RSS\Complete\UFC Fight Night 62 Maia vs LaFlare 2015 03 21 HDTV x264-NWCHD -={SPARROW}=-
Input: E:\Users\[i]username[/i]\Downloads\utorrent RSS\Complete\UFC Fight Night 62 Maia vs LaFlare 2015 03 21 HDTV x264-NWCHD -={SPARROW}=-\UFC.Fight.Night.62.Maia.vs.LaFlare.2015.03.21.HDTV.x264-NWCHD.mp4
Exclude: E:\Users\[i]username[/i]\Downloads\utorrent RSS\Complete\UFC Fight Night 62 Maia vs LaFlare 2015 03 21 HDTV x264-NWCHD -={SPARROW}=-\Torrent Downloaded From ExtraTorrent.cc.txt
Mar 27, 2015 6:52:48 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Group: [mov:null] => [UFC.Fight.Night.62.Maia.vs.LaFlare.2015.03.21.HDTV.x264-NWCHD.mp4]
Get [English] subtitles for 1 files
CmdlineException: OpenSubtitles: Please enter your login details by calling `filebot -script fn:configure`
Finished without processing any files
Failure (°_°)
As you can see from the Group: [mov:null] it's not getting matched as a movie but here's the link to it on TMDB - https://www.themoviedb.org/movie/332102 ... vs-laflare

If i remove the label it tries to match it as a TV, here's what's in the log.

Code: Select all

Group: [tvs:ufc fight night 62 maia vs laflare] => [UFC.Fight.Night.62.Maia.vs.LaFlare.2015.03.21.HDTV.x264-NWCHD.mp4]

Rename episodes using [TheTVDB]
Auto-detected query: [UFC Fight Night 62 Maia vs LaFlare, UFC Fight Night 62 Maia LaFlare]
Failed to fetch episode data: [UFC Fight Night 62 Maia vs LaFlare, UFC Fight Night 62 Maia LaFlare]
CmdlineException: Unable to match files to episode data
However this won't work as there is no UFC listings on TheTVDB.

Anyone have any ideas what's going on with it, how I can get it to match as a movie and also it move it to it's own folder?

Thanks

Re: Script not matching UFC

Posted: 27 Mar 2015, 20:23
by rednoah
1. Your format is syntactically incorrect. You will find many examples how to do it right here in the forums.

2. Read the error message and do as it says, i.e. enter OpenSubtitles login details.

3. The name doesn't match the movie. Similar but not a match due to the extra number in the middle of the "movie name". You will need to use the GUI if you want to process these files.

Re: Script not matching UFC

Posted: 27 Mar 2015, 21:23
by Corbula
Thanks for the reply.

1. Yes I know, I've looked at a lot of posts on here including the advanced expressions one and noticed the 3D movies and non 3D movies one. This is as far as I've gotten but don't know how to correct it. I've tried a few different formats trying to move it to a different folder if it contains a certain phrase but with no success.
Why is it incorrect? Is it close to be correct?

2. I've removed subtitles as I don't have an account or need to get subtitles (didn't know I needed an account for opensubtitles) I left it in because in the past it's still processed the file regardless.

3. I removed the number from the middle of the name and it did match it correctly. Thanks for that but thought it would be able to match it anyway regardless.


What is wrong with the part trying to move it to a different folder based on it containing a certain phrase?

Thanks

Re: Script not matching UFC

Posted: 28 Mar 2015, 07:42
by rednoah
1) Coding is the new literacy. Here's some basics. ;)

NO

Code: Select all

{fn =~ /UFC/ ? }
YES

Code: Select all

{fn =~ /UFC/ ? 'A' : 'B'}

2) It's a warning.If you don't want subtitles then remove subtitles=en.

3) No. If you add random words into the movie name it will generally not work. The fact that it's named as if it was a tv series doesn't help.

Re: Script not matching UFC

Posted: 28 Mar 2015, 16:53
by Corbula
Thanks a lot.

1) I've finally got it working so thanks for the help.

Code: Select all

filebot -script fn:amc --output "E:\Users\username\Videos" --log-file amc.log --action copy --conflict override -non-strict --def music=y "seriesFormat=E:/Users/username/Videos/TV/{n}/Season {+s}/{n} - {sxe} - {t} " "movieFormat=E:/Users/username/Videos/{fn =~ /UFC/ ? 'UFC' : 'Movies'}/{n} ({y})/{n} ({y})" excludeList=amc-input.txt "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
2) Removed

3) I used this as just an example, the actual ones I will be getting are much better named so shouldn't be a problem.