Adding language names with codecs
Posted: 21 Feb 2014, 15:01
Hi again. I deal with multilanguage tv shows and movies a *lot*, I rip English audio and then always take French and Dutch if they are present on the Blu-ray. I take the DTS core if the source is DTS-HD MA and the AC3 core if it's TrueHD. Sometimes, shows/movies with a DTS-HD MA main language will have AC3 foreign languages.
Now, I want to know, at a glance, which languages (and their codec) are present in each mkv. For the sake of keeping the filename as short as possible, I'm trying to get it to list them as follows:
This bit of code accomplishes this:
but only if the codec for all languages is DTS.
What I *really* would love, if there are languages in more than one codec is for it to output something like:
It would ideally only mention the codec once and then list each language in that codec after the codec name. I thought of maybe somehow nesting the audios.language parts inside the braces with the ac.match part and having something like:
but this doesn't work (probably for obvious reasons, I'm still finding my way around groovy scripting). For this to work, it would need to be able to identify the codec for each language and only add the language that matched either DTS or AC3 in the appropriate "section". I don't know if I can do iteration like this in groovy or not.
The only languages I really care about are en, fr and nl but some movies have foreign audio only (Sin Nombre, Seven Samurai, etc etc) so I will just include all 2-letter track names that I find.
Now, is this beyond the scope of what Filebot/groovy can do? Any help would be much appreciated.
Now, I want to know, at a glance, which languages (and their codec) are present in each mkv. For the sake of keeping the filename as short as possible, I'm trying to get it to list them as follows:
Code: Select all
<movie name, year, resolution, source etc>.DTS.en.fr.nl.<video codec>
Code: Select all
{ac.match(/DTS/)}{'.'+audios.language[0]}{'.'+audios.language[1].replaceAll("null", "")}{'.'+audios.language[2].replaceAll("null", "")}
What I *really* would love, if there are languages in more than one codec is for it to output something like:
Code: Select all
<movie name, year, resolution, source etc>.DTS.en.AC3.fr.nl.<video codec>
Code: Select all
{ac.match(/DTS/){'.'+audios.language[0]}{'.'+audios.language[1].replaceAll("null", "")}{'.'+audios.language[2].replaceAll("null", "")}}{ac.match(/AC3/){'.'+audios.language[0]}{'.'+audios.language[1].replaceAll("null", "")}{'.'+audios.language[2].replaceAll("null", "")}}
The only languages I really care about are en, fr and nl but some movies have foreign audio only (Sin Nombre, Seven Samurai, etc etc) so I will just include all 2-letter track names that I find.
Now, is this beyond the scope of what Filebot/groovy can do? Any help would be much appreciated.