Page 1 of 1

UNCUT, EXTENDED, DIRECTORS CUT

Posted: 14 Jan 2013, 14:48
by cheesemaker
Please also add function for EXTENDED, UNCUT, DIRECTORS CUT, etc. specifications for the movie

Thanks,

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 14 Jan 2013, 14:54
by rednoah
You mean this?

Code: Select all

{fn.match(/EXTENDED|UNCUT|DIRECTORS.CUT/)}

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 20 Jan 2013, 09:05
by cheesemaker
Thanks, Does this piece of code also match Uncut/uncut?

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 20 Jan 2013, 09:41
by rednoah
Yep, match() is case-insensitive.

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 20 Jan 2013, 17:11
by cheesemaker
Doesn't work for:

[MOVE] Rename [/mnt/raid/downloads/transfer/Red.Tears.Uncut.2011.1080p.BluRay.x264-ENCOUNTERS/encounters-redtears_1080p.mkv] to [/mnt/raid/media/Filme/Monster.Killer.2011/Monster.Killer.2011.BluRay.1080p.x264.DTS-ENCOUNTERS.mkv]

with naming scheme:
mov: '''Filme/{n.upperInitial().space('.')}.{y}/{n.upperInitial().space('.')}.{y}{fn.match('.'+/EXTENDED|UNCUT|DIRECTORS.CUT/)}{'.'+fn.match(/H-SBS/)}{".$source"}{".$vf"}{".$vc"}{".$ac"}{"-$group"}{".$lang"}'''

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 20 Jan 2013, 17:21
by rednoah
Didn't I just post this snipped today? :?:

WRONG:

Code: Select all

{fn.match('.'+/EXTENDED|UNCUT|DIRECTORS.CUT/)}
CORRECT:

Code: Select all

{'.'+fn.match(/EXTENDED|UNCUT|DIRECTORS.CUT/)}

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 20 Jan 2013, 17:51
by cheesemaker
yes you did ;), thanks,

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 20 Jan 2013, 18:03
by cheesemaker
Ok, It works for (if uncut is in the filename)
[MOVE] Rename [/mnt/raid/downloads/T/Gran.Torino.Uncut.DL.1080p.BluRay.x264-DEFUSED/dfd-gran.torino-1080p-uncut.mkv] to [/mnt/raid/media/Filme/Gran.Torino.2008/Gran.Torino.2008.uncut.BluRay.1080p.x264.AC3-DEFUSED.mkv]

But it doesn't work if it's only in the directory name:

Skipped [/mnt/raid/downloads/T/Gran.Torino.Uncut.DL.1080p.BluRay.x264-DEFUSED/dfd-gran.torino-1080p.mkv] because [/mnt/raid/media/Filme/Gran.Torino.2008/Gran.Torino.2008.BluRay.1080p.x264.AC3-DEFUSED.mkv] already exists

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 20 Jan 2013, 18:18
by rednoah

Code: Select all

{'.'+file.path.match(...)}

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 01 Jan 2014, 18:49
by cheesemaker
Hi rednoah.

How can I match "Uncut" if it is in the file path or in the Filename or in both?

Thanks,

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 01 Jan 2014, 19:17
by rednoah

Code: Select all

{file.path.match(/uncut/)}

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 02 Jan 2014, 03:38
by Ithiel
Hi Cheese,

If you want to see an example of this in action, I use a similar method here: http://www.filebot.net/forums/viewtopic ... 1205#p7303

Code: Select all

{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|special[ ._-]edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[.]/, " ") + ')'}
That scans for extended, uncensored, remastered, unrated, and special edition (in upper or lower case), and adds them neatly at the end.

If you wanted 'uncut' and directors cut in there as well, just tweak it like so:

Code: Select all

{' (' + fn.matchAll(/extended|uncensored|uncut|directors[ ._-]cut|remastered|unrated|special[ ._-]edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[.]/, " ") + ')'}

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 02 Jan 2014, 04:42
by rednoah
You can use . which is wildcard for any character:

Code: Select all

directors.cut

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 02 Jan 2014, 06:14
by Ithiel
ah, righto - so this then?

Code: Select all

{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}
I thought I tested that unsuccessfully when I first set it up, however it looks like it's a happy little Vegemite now.

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 08 Jan 2014, 15:14
by cheesemaker
Thank you for your answer. Unfortunately, it's not working well. Can you take a look at my code?

Code: Select all

[user@server My.Movie.2000.EXTENDED.REMASTERED.German.DL.1080p.BluRay.x264.PROPER-DETAiLS]$ sudo -u pyload /mnt/raid/data/pyload/filebot.sh -script /mnt/raid/data/pyload/amc.groovy "/mnt/raid/data/download/pyload/My Movie 2000 EXTENDED REMASTERED German DL 1080p BluRay x264 PROPER-DETAiLS"/ --output "/mnt/raid/data/media/" --log-file amc.log --conflict skip --action move -non-strict --def clean=y subtitles=en,de music=no artwork=no --def "movieFormat=Filme/{n.upperInitial().space('.')}.({y})/{n.upperInitial().space('.')}.({y}){'.' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, \" \")}{fn.match(/HOU|H-OU/) ? '.3D.H-OU' : ''}{fn.match(/HSBS|H-SBS/) ? '.3D.H-SBS' : ''}{\".\$ac\"}{\".\$vf\"}{\".\$source\"}{\".\$vc\"}{'.' + fn.matchAll(/repack|proper/)*.upper().sort().join(', ').replaceAll(/[._]/, \" \")}{\"-\$group\"}{'.'+fn.match(/forced/)}{\".\$lang\"}" "seriesFormat=Serien/{n.upperInitial().space('.')}/Season.{s}/{n.upperInitial().space('.')}.-.{s00e00}{'.' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, \" \")}{\".\$ac\"}{\".\$vf\"}{\".\$source\"}{\".\$vc\"}{'.' + fn.matchAll(/repack|proper/)*.upper().sort().join(', ').replaceAll(/[._]/, \" \")}{\"-\$group\"}{'.'+fn.match(/forced/)}{\".\$lang\"}"
Locking /mnt/raid/data/pyload/.filebot/logs/amc.log
Parameter: clean = y
Parameter: subtitles = en,de
Parameter: music = no
Parameter: artwork = no
Parameter: movieFormat = Filme/{n.upperInitial().space('.')}.({y})/{n.upperInitial().space('.')}.({y}){'.' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition|remastered/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ")}{fn.match(/HOU|H-OU/) ? '.3D.H-OU' : ''}{fn.match(/HSBS|H-SBS/) ? '.3D.H-SBS' : ''}{".$ac"}{".$vf"}{".$source"}{".$vc"}{'.' + fn.matchAll(/repack|proper/)*.upper().sort().join(', ').replaceAll(/[._]/, " ")}{"-$group"}{'.'+fn.match(/forced/)}{".$lang"}
Parameter: seriesFormat = Serien/{n.upperInitial().space('.')}/Season.{s}/{n.upperInitial().space('.')}.-.{s00e00}{'.' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition|remastered/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ")}{".$ac"}{".$vf"}{".$source"}{".$vc"}{'.' + fn.matchAll(/repack|proper/)*.upper().sort().join(', ').replaceAll(/[._]/, " ")}{"-$group"}{'.'+fn.match(/forced/)}{".$lang"}
Argument: /mnt/raid/data/download/pyload/My Movie 2000 EXTENDED REMASTERED German DL 1080p BluRay x264 PROPER-DETAiLS
Input: /mnt/raid/data/download/pyload/My Movie 2000 EXTENDED REMASTERED German DL 1080p BluRay x264 PROPER-DETAiLS/My.Movie.2000.EXTENDED.REMASTERED.German.DL.1080p.BluRay.x264.PROPER-DETAiLS/d-mymovie-1080p.eng.srt
Input: /mnt/raid/data/download/pyload/My Movie 2000 EXTENDED REMASTERED German DL 1080p BluRay x264 PROPER-DETAiLS/My.Movie.2000.EXTENDED.REMASTERED.German.DL.1080p.BluRay.x264.PROPER-DETAiLS/d-mymovie-1080p.mkv
Input: /mnt/raid/data/download/pyload/My Movie 2000 EXTENDED REMASTERED German DL 1080p BluRay x264 PROPER-DETAiLS/My.Movie.2000.EXTENDED.REMASTERED.German.DL.1080p.BluRay.x264.PROPER-DETAiLS/d-mymovie-1080p.deu.srt
d-mymovie-1080p.eng.srt [series: null, movie: My Movie (2000)]
d-mymovie-1080p.mkv [series: null, movie: My Movie (2000)]
d-mymovie-1080p.deu.srt [series: null, movie: My Movie (2000)]
Group: [tvs:null, mov:My Movie (2000), anime:null] => [d-mymovie-1080p.eng.srt, d-mymovie-1080p.mkv, d-mymovie-1080p.deu.srt]
No missing subtitles
No missing subtitles
Rename movies using [TheMovieDB]
Skipped [/mnt/raid/data/download/pyload/My Movie 2000 EXTENDED REMASTERED German DL 1080p BluRay x264 PROPER-DETAiLS/My.Movie.2000.EXTENDED.REMASTERED.German.DL.1080p.BluRay.x264.PROPER-DETAiLS/d-mymovie-1080p.mkv] because [/mnt/raid/data/media/Filme/My.Movie.(2000)/My.Movie.(2000).DTS.1080p.BluRay.x264-DETAiLS.mkv] already exists
Skipped [/mnt/raid/data/download/pyload/My Movie 2000 EXTENDED REMASTERED German DL 1080p BluRay x264 PROPER-DETAiLS/My.Movie.2000.EXTENDED.REMASTERED.German.DL.1080p.BluRay.x264.PROPER-DETAiLS/d-mymovie-1080p.eng.srt] because [/mnt/raid/data/media/Filme/My.Movie.(2000)/My.Movie.(2000).DTS.1080p.BluRay.x264-DETAiLS.eng.srt] already exists
Skipped [/mnt/raid/data/download/pyload/My Movie 2000 EXTENDED REMASTERED German DL 1080p BluRay x264 PROPER-DETAiLS/My.Movie.2000.EXTENDED.REMASTERED.German.DL.1080p.BluRay.x264.PROPER-DETAiLS/d-mymovie-1080p.deu.srt] because [/mnt/raid/data/media/Filme/My.Movie.(2000)/My.Movie.(2000).DTS.1080p.BluRay.x264-DETAiLS.deu.srt] already exists
Processed 3 files
Clean clutter files and empty folders
Done ヾ(@⌒ー⌒@)ノ
You see, it doesn't include "extended" or "remastered" and "proper"... It looks like it works if only one of the keywords matches. If there are two like in this case it doesn't work...

Best Regards,

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 08 Jan 2014, 17:30
by rednoah
This one definitely works:

Code: Select all

{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}
@see http://snag.gy/PLIPX.jpg

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 08 Jan 2014, 18:33
by cheesemaker
Hi rednoah,

Thanks for your reply. I'm sorry, I think I understood the snipped wrong.

How can I match "Extended" and "Remastered" if it is in the filepath or in the filename (or both)?
Because like above I have the directory :"My.Move.2000.EXTENDED.REMASTERED.German.DL.1080p.BluRay.x264.PROPER-DETAiLS" and the file "d-mymovie-1080p.mkv".

The snipped won't match the "Extended" and "Remastered", only if it is in the filename like "d-mymovie-1080p.Extended.Remastered.mkv"

Code: Select all

--def "movieFormat={' (' + file.path.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, \" \") + ')'}"
Will give me something like this:

Code: Select all

/mnt/raid/data/media/ (Extended, Extended, Remastered, Remastered).mkv
Because in the filepath "Extended" is named twice. How can I fix that and just take every word only one time?

Best Regards,

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 08 Jan 2014, 19:08
by rednoah
Just add a unqiue() call:

Code: Select all

.sort().unique()

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 25 Mar 2014, 18:01
by Orochi
Hello,

What do I have to add to this code:

Code: Select all

{'.'+fn.match(/EXTENDED|UNCUT|REMASTERED|DIRECTORS.CUT/)}
To make the EXTENDED appear all in capital letters.?

Thank you.

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 25 Mar 2014, 19:10
by rednoah

Code: Select all

{'.'+fn.match(/EXTENDED|UNCUT|REMASTERED|DIRECTORS.CUT/).upper()}

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 23 Jun 2015, 06:07
by Brooklyn11218
Sorry to drudge up an older thread but I'm looking for help with something mentioned in this thread.

I want to have filebot search in both the filename and folder name for the Uncut, Extended, etc and add it to the renamed file. This way if it doesn't find it in the file name it can check the folder name as a backup and still add it.

After searching the site and copy/pasting/mutilating other peoples code I've come up with this:

Code: Select all

../{collection+'/'}{norm = {it.replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() })}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'} ({y}) [{genres[0]}, {' '+any{certification}{imdb.certification}.replaceAll(/^\d+$/, 'PG-$0')}, {vf}]/{norm(n)}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'} ({y}) {"[$vf]"}{' - '+group}{" Part $pi"}{'.'+lang}
Which would be something like this:

Code: Select all

Before: aqos-curse.of.chucky.2013.unrated.hdrip.xvid\aqos-curse.of.chucky.2013.unrated.hdrip.xvid.avi
after:Child's Play Collection\Curse of Chucky (Unrated) (2013) [Horror, R, 360p]\Curse of Chucky (Unrated) (2013) [360p] - AQOS.avi
But if I use it on a file that only has unrated in the folder name but not the file it shows this:

Code: Select all

Before: Bridesmaids[2011][Unrated Edition]DvDrip[Eng]-FXG\Bridesmaids (2011).srt
After: Bridesmaids (2011)[Comedy, R, 360p]\Bridesmaids (2011) [360p] - FXG.eng.srt
Can someone help me get the what I'm trying to do? Or is it impossible?

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 23 Jun 2015, 09:05
by rednoah
Have you tried the tags bindings?

Code: Select all

{tags}
The OP is a bit outdated, so nowadays you'll probably be fine with using {tags} unless you absolutely need to specify your own video tag patterns.

The {tags} binding will match all occurrences of the following pattern in file/folder/original names:

Code: Select all

extended|uncensored|remastered|unrated|uncut|director.?s.cut|theatrical.cut|ultimate.cut|final.cut|special.edition

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 23 Jun 2015, 14:51
by Brooklyn11218
omg that was SO much easier. You just cut that code in half. Thank you so much!

You might want to update the http://www.filebot.net/naming.html page to add {tags} to the list.

Re: UNCUT, EXTENDED, DIRECTORS CUT

Posted: 23 Jun 2015, 16:01
by rednoah
It's best to refer to the in-app binding reference because you'll see the actual values for the files you're testing with.

Image