Group languages by audio codec (e.g. ITA.ENG.DTS.JAP.AC3)

All about user-defined episode / movie format expressions
Post Reply
Vessiel
Posts: 2
Joined: 02 Dec 2021, 21:50

Group languages by audio codec (e.g. ITA.ENG.DTS.JAP.AC3)

Post by Vessiel »

Hi, I would like my movies to have this format:

Code: Select all

City Hunter - Private Eyes (2019) - BluRay.1080p.x264.ITA.DTS.JAP.AC3.Subs.ITA.JAP.[Group]
with DVD or BluRay or WEB.

If there are two or more languages ​​with the same codec I would like them like this:

Code: Select all

City Hunter - Private Eyes (2019) - BluRay.1080p.x264.ITA.ENG.DTS.JAP.AC3.Subs.ITA.JAP.[Group]
Is it possible?

Thanks! :)
User avatar
rednoah
The Source
Posts: 20850
Joined: 16 Nov 2011, 08:59

Re: Movies scheme for beginners

Post by rednoah »

Possible but not easy. Intricate custom requirements will require a fair bit of programming experience to create and maintain. Definitely not recommended for beginners.


If you already have a format, then you can just add something like this at the end:

Code: Select all

{ '.' + vs } 
{ '.' + vf }
{ '.' + audio.groupBy{ a -> a.format.removeAll(/[^A-Z0-9]/) }.collect{ c, a -> a.LanguageString3*.upper().unique().join('.') + '.' + c }.join('.') }
{ '.Subs.' + textLanguages.ISO3*.upper().join('.') } 
{ '.[' + group + ']' }


If you want to integrate with the {plex} format then then it'll get a bit more tricky:

Code: Select all

X:/Media/
{
	plex.derive
	{ ' - ' }
	{ allOf
		{ vs } 
		{ vf }
		{ audio.groupBy{ a -> a.format.removeAll(/[^A-Z0-9]/) }.collect{ c, a -> a.LanguageString3*.upper().unique().join('.') + '.' + c }.join('.') }
		{ 'Subs.' + textLanguages.ISO3*.upper().join('.') } 
		{ '[' + group + ']' }
		.join('.')
	}
}
:idea: Please read the FAQ and How to Request Help.
Vessiel
Posts: 2
Joined: 02 Dec 2021, 21:50

Re: Group languages by audio codec (e.g. ITA.ENG.DTS.JAP.AC3)

Post by Vessiel »

Thanks to your code I understood a lot of things. The first solution is exactly what I was looking for.

Thanks again
Post Reply