Page 1 of 1

Add source from Filename if not in Meta & Change audios.lang

Posted: 07 Sep 2014, 09:40
by stereotype
Hi there,

I'm renaming my series right now with this code:

Code: Select all

{n} - {s00e00} - {t} - {vf} {source} - {ac}-{af.replaceAll(/2ch/, "2.0").replaceAll(/6ch/, "5.1")} - {audios.language}
But sometimes, the meta infos don't have the Source tag, even it is in the filename. Can i extract it from there then?

Also {audios.language} creates an array like this: [de, en], but i would like to replace the strings like this: if [de, en] rename it to "DL", if only one language make it uppercase like DE or EN and remove the brackets. (replaceAll somehow doesn't work with {audios.language}.
If theres only "en" changing the episode title to the english name would be icing on the cake :D (It's always german right now"

Any help?

kind regards,
stereo

Re: Add source from Filename if not in Meta & Change audios.

Posted: 07 Sep 2014, 13:17
by rednoah
{source} is already based on the file name. If it's not working send the file path here.

Use array.join(', ').upper() and keep in mind replaceAll only works on String objects.