separate HD, 4K and genre

All about user-defined episode / movie / file name format expressions
Post Reply
Guiro
Posts: 1
Joined: 24 Nov 2023, 10:26

separate HD, 4K and genre

Post by Guiro »

Hello, I use filebot node on my server and I would like to separate HD and 4K videos into folders, but also into genre folders.
This is what I'm currently using and I don't know how to split 4k videos.

Groovy: Select all

seriesFormat={ genres =~ /Animation/ ? 'Séries d\'animations' : genres =~ /Documentaire|Reality/ ? 'Séries Documentaires' : 'Séries' }/{ plex.tail }{" tvdb-$id"}
movieFormat={ genres =~ /Animation/ ? 'Films d\'animations' : genres =~ /Documentaire|Reality/ ? 'Films Documentaires' : 'Films'}/{ plex.tail }{" tmdb-$id"}
If anyone could help me, because I don't know how to do it at all.

thank you
User avatar
rednoah
The Source
Posts: 23529
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: separate HD, 4K and genre

Post by rednoah »

I guess you could just add 4K somewhere in the file path?

Format: Select all

{ height > 2000 ? '4K' : '' }

e.g.

Format: Select all

{
	if (genres =~ /Animation/)
		return "Séries d'animations"
	if (genres =~ /Documentaire|Reality/)
		return "Séries Documentaires"
	else
		return "Séries"
}
{
	if (height > 2000)
		return " 4K"
	if (height > 700)
		return " HD"
	else
		return ""
}
/
{
	~plex.id
}



:idea: You'll want to use @file syntax to read format code from external *.groovy text files:

Shell: Select all

--def movieFormat=@/path/to/MovieFormat.groovy
:idea: Please read the FAQ and How to Request Help.
Post Reply