Code: Select all
audioLanguages.ISO3 - 'eng'Code: Select all
audioLanguages.ISO3 - 'eng'rednoah wrote: ↑25 Jul 2017, 09:07 Remove "eng" from the list:Code: Select all
audioLanguages.ISO3 - 'eng'
Thank you for the explanation


Code: Select all
Filmer/{n} {' ['+fn.replaceAll(/(?i)directors|theatrical|ultimate/,'$0 Cut').matchAll(/UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTORS.CUT|THEATRICAL.CUT|ULTIMATE.CUT|SPECIAL.EDITION/).join('][').upperInitial().lowerTrail()+']'} ({y}) {vf} {source} {gigabytes} {audioLanguages}/{n} ({y}) {' CD'+pi} - {dim} {vf} {vc} [{ac}{fn.match("-HD.MA.")}-{af}]{'.'+lang}
 {tags} will also check accompanying video files for tags, but I'm not sure if it'll work in your particular case, since video and subtitle files have completely different names in your particular case.
 {tags} will also check accompanying video files for tags, but I'm not sure if it'll work in your particular case, since video and subtitle files have completely different names in your particular case.Code: Select all
Movies/{ny} {tags}/{plex.name}Code: Select all
{ny.colon(' - ')}Code: Select all
Movies/{n.colon(' - ')} {tags} ({y}) {vf} {source} {gigabytes} {audioLanguages}/{ny.colon(' - ')} - [{resolution}] [{vf} & {vc}] [{ac}{fn.match("-HD.MA.")}-{af}]{' CD'+pi}{'.'+lang}Code: Select all
Filmer/{n.colon(' - ')} {tags} ({y}) {vf} {source} {gigabytes} {audioLanguages}/{plex.name} - [{resolution}] [{vf} & {vc}] [{ac}{fn.match("-HD.MA.")}-{af}]Code: Select all
{(folder.listFiles()*.length().sum() / 1e9).round(1) + " GB"}Code: Select all
{plex.derive{" by $director"}{" [$vf, $vc, $ac]"}} 
 Code: Select all
Movies/{n.colon(' - ')} {tags} ({y}) {vf} {source} {(folder.listFiles()*.length().sum() / 1e9).round(1) + " GB"}/{plex.derive{" [$resolution]"}{" [$vf-$vc] [$ac-$af]"}}
Code: Select all
{folder.listFiles()*.name} If you provide more detailed information (i.e. full file paths) then I may be able to help you write code that works for you.
 If you provide more detailed information (i.e. full file paths) then I may be able to help you write code that works for you.Code: Select all
{plex.tail} viewtopic.php?f=5&t=4116
 viewtopic.php?f=5&t=4116Code: Select all
Filmer/{n.colon(' - ')} {tags} ({y}) {vf} {source} {folder.listFiles()*.name}/{plex.derive{" [$resolution]"}{" [$vf-$vc] [$ac-$af]"}}Code: Select all
model.findAll{ it.id == id }.file.length.sum()Code: Select all
{def size = model.findAll{ it.id == id }.file.length.sum(); (size / 1e9).round(1) + ' GB'}Code: Select all
{f.path.match(/REMASTERED|DC/)} The obvious limitation being that this doesn't work if REMASTERED does not appear in the full path of the subtitle file (i.e. it'll work for the use case you have given, but may not work for other use cases you have not given).
 The obvious limitation being that this doesn't work if REMASTERED does not appear in the full path of the subtitle file (i.e. it'll work for the use case you have given, but may not work for other use cases you have not given).Code: Select all
{plex.derive{" [$resolution]"}{" [$vf-$vc] [$ac-$af]"}.name} 
 Code: Select all
Anime/{n.colon(' - ')} {tags} ({y}) {vf} {source} {def size = model.findAll{ it.id == id }.file.length.sum(); (size / 1e9).round(1) + ' GB'} {imdbid} {audioLanguages}/{plex.derive{" [$resolution]"}{" [$vf-$vc] [$ac-$af]"}.name}Code: Select all
Movies/{n.colon(' - ')} {tags} ({y}) {vf} {source} {def size = model.findAll{ it.id == id }.file.length.sum(); (size / 1e9).round(1) + ' GB'} {imdbid}/{plex.derive{" [$resolution]"}{" [$vf-$vc] [$ac-$af]"}.name}Code: Select all
{info.productionCompanies}Code: Select all
{"$channels-$ac"}-{audioLanguages.ISO3B*.upper().joining('-')}Code: Select all
{audios.collect{it.channels} '-' {it.CodecFamily} '-' {it.language}.join(' + ')}
Code: Select all
{audio.Codec}Code: Select all
{audio.Channels}Code: Select all
{audio.Language}
This largely depends on your preferences, and expectations of 3rd party programs that will be interpreting your file names. If you're using Plex, then ISO 639-2/B (i.e. Language.ISO3B) is recommended. That being said, it generally doesn't matter, unless you're Dutch.
Code: Select all
allStreams.join(' & ').space('.')Code: Select all
allStreams.take(3).join(' + ')Code: Select all
{audios.collect{it.channels} '-' {it.CodecFamily} '-' {it.language}.join(' + ')}Code: Select all
{audio.collect{it.channels + '-' + it.Format + '-' + it.language}.join(' + ')}Code: Select all
{audioLanguages[0].ISO3.upper()}-{Channels}-{ac}
{audio.size() > 1 ? ' + ' : null}
{audio.size() > 1 ? audio[1].Language.upper() : null}
{audio.size() > 1 ? '-' : null}
{audio.size() > 1 ? audio[1].Channels : null}
{audio.size() > 1 ? '-' : null}
{audio.size() > 1 ? audio[1].Format : null}, 
 audioLanguages will give you structured Language objects, as opposed to audio.language which will give you String objects. Language objects have properties such as Language.ISO3 while String objects do not.
 audioLanguages will give you structured Language objects, as opposed to audio.language which will give you String objects. Language objects have properties such as Language.ISO3 while String objects do not. channels is inferred based on interpreting the ChannelLayout properties of all streams. Replicating the code is possible but non-trivial.
 channels is inferred based on interpreting the ChannelLayout properties of all streams. Replicating the code is possible but non-trivial.Code: Select all
{
	audio.take(2).collect{ a -> allOf
		{ a.Language.upper() }
		{ a.Channels.replace(2:'2.0', 6:'5.1', 8:'7.1') }
		{ a.Format }
	}.join(' + ')
}Code: Select all
[EN, 2.0, AC-3] + [JA, 2.0, AC-3]Code: Select all
{
	audio.take(2).collect{ a -> allOf
		{ a.Language_String3.upper() }
		{ a.Channels.replace(2:'2.0', 6:'5.1', 8:'7.1') }
		{ a.Format }
	}.join(' + ')
}Code: Select all
{
	audio.take(2).collect{ a -> allOf
		{ a.Language_String3.upper() }
		{ a.Channels.replace(2:'2.0', 6:'5.1', 8:'7.1') }
		{ a.Format }
	}.join(' + ')
}Code: Select all
{
	audio.take(2).collect{ a -> allOf
		{ a.Language_String3.upper() }
		{ a.Channels.replace(2:'2.0', 6:'5.1', 8:'7.1') }
		{ a.Format }
	}*.joining('-', '(', ')').join(' + ')
}this is super awesome!!!rednoah wrote: ↑02 Sep 2020, 02:18 e.g.Code: Select all
{ audio.take(2).collect{ a -> allOf { a.Language_String3.upper() } { a.Channels.replace(2:'2.0', 6:'5.1', 8:'7.1') } { a.Format } }*.joining('-', '(', ')').join(' + ') }