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

All about user-defined episode / movie / file name format expressions
Post Reply
stereotype
Posts: 8
Joined: 04 Jan 2013, 17:21

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

Post 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
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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.
:idea: Please read the FAQ and How to Request Help.
Post Reply