Page 1 of 1
How to prioritized some tag over another one
Posted: 27 Mar 2022, 14:25
by FTW
Hi, here few question about filebot and AMC
what's the schema of priority for FileBot and AMC? 1. PROPER 2. REPACK 3. ???
is there any way I can choose myself? I would like to be able to prioritized release with
1. REAL.PROPER
2. PROPER
3. REPACK
but
1. EXTENDED
2. UNRATED
will overwrite REAL.PROPER if the release are not EXTENDED OR UNRATED
is there a way of asking from filebot CLI or AMC doing that?
or an option for choosing priority?
Thank You
Best Regards
Re: How to prioritized some tag over another one
Posted: 28 Mar 2022, 01:34
by rednoah
--conflict auto cannot work with this level of understanding of content. It'll merely pick the one with the higher resolution / higher bitrate if there is a file-path-conflict. You'd have to write your own
custom action and express what you want as bash script yourself, so it wouldn't be easy.
You can bypass the problem by keeping all editions of a movie by retaining certain patterns from the original file path, as to avoid file-path-duplicates at processing time, and then figure out what to do about movie-duplicates delete later:
Code: Select all
{ fn.matchAll(/REAL.PROPER|PROPER|REPACK|EXTENDED|UNRATED/) }
[SNIPPET] Match information from the file path
Re: How to prioritized some tag over another one
Posted: 28 Mar 2022, 19:15
by FTW
alright thank You very much
and how I can use that as optional? -> { fn.matchAll(/REAL.PROPER|PROPER|REPACK|EXTENDED|UNRATED/) }
My regex are not optimal yet sorry uhuh... how can I use it for releases without any of these words too?
Re: How to prioritized some tag over another one
Posted: 29 Mar 2022, 03:12
by rednoah
You can use this for releases without any of these words. It'll just match nothing.
Re: How to prioritized some tag over another one
Posted: 29 Mar 2022, 07:36
by FTW
awesome thank you
Re: How to prioritized some tag over another one
Posted: 02 Apr 2022, 14:46
by FTW
its work pretty well
but I have a preset using groovy code
how can I use that in my code without needed to create duplicate return command like that??
Code: Select all
{
def n = folder.dir.name
def s = folder.name.before(/.S\d\dE\d\d|\d{4}/)
def z = folder.name.before(/.S\d\dE\d\d|\d{4}/).replaceAll(/[.]/," ")
def e = fn.match(/S(\d\d)E\d\d|(20\d{2})/)
def t = fn.match(/S\d\dE\d\d|20\d{2}/)
def a = fn.match(/[A-Z0-9]/)
def y = y
def d = any{n.matchALL(/REAL.PROPER|PROPER|REAL.REPACK|REPACK|SUBFIX/)} {};
if(d!=NULL) return "/TV-FR/$a/$s.$y/Season $e/$z - $t $d"
if(d==NULL) return "/TV-FR/$a/$s.$y/Season $e/$z - $t"
}
is there a way to optimise this code??
Thanks
Best Regards
Re: How to prioritized some tag over another one
Posted: 02 Apr 2022, 16:35
by rednoah
Doesn't it work already? I guess you want
d to yield nothing "" instead of "null" so:
Code: Select all
def d = any{ n.matchALL(/REAL.PROPER|PROPER|REAL.REPACK|REPACK|SUBFIX/) }{ "" }
return "/TV-FR/$a/$s.$y/Season $e/$z - $t $d"
Re: How to prioritized some tag over another one
Posted: 03 Apr 2022, 12:38
by FTW
yes its work, just want to find a better way for that code cause If I want to add more stuff, I will have too many line like the if(d!=NULL) return
and since I don't known groovy code, I was sure there a better code instead of the if null
Thanks, I will add the ""
