How to prioritized some tag over another one

Any questions? Need some help?
Post Reply
FTW
Posts: 39
Joined: 28 Jan 2022, 09:47

How to prioritized some tag over another one

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to prioritized some tag over another one

Post 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/) }
:arrow: [SNIPPET] Match information from the file path
:idea: Please read the FAQ and How to Request Help.
FTW
Posts: 39
Joined: 28 Jan 2022, 09:47

Re: How to prioritized some tag over another one

Post 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?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to prioritized some tag over another one

Post by rednoah »

You can use this for releases without any of these words. It'll just match nothing.
:idea: Please read the FAQ and How to Request Help.
FTW
Posts: 39
Joined: 28 Jan 2022, 09:47

Re: How to prioritized some tag over another one

Post by FTW »

awesome thank you
FTW
Posts: 39
Joined: 28 Jan 2022, 09:47

Re: How to prioritized some tag over another one

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to prioritized some tag over another one

Post 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"
:idea: Please read the FAQ and How to Request Help.
FTW
Posts: 39
Joined: 28 Jan 2022, 09:47

Re: How to prioritized some tag over another one

Post 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 "" :P
Post Reply