Page 1 of 1

Error Message using ".$lang" expression

Posted: 29 Dec 2013, 00:45
by akira2012
Hello,

first of all: GREAT PROGRAMM. Saved my tons of time =)

I have a problem with the renaiming of Sub-Files using lang. Here is what my format looks like:

Code: Select all

G:\Videos\Filme_neu\{n.replaceFirst(/^(?i)(The|A)\s(.+)/, /$2, $1/)} {'('+y+')'}\{n.replaceFirst(/^(?i)(The|A)\s(.+)/, /$2, $1/)} {"${fn.match(/3D/)}"}{" CD$pi"} {".$lang"}
But I always get the error message "BindingError: "lang": undefinied

I get this message also whem I try the syntax from the examples:

Code: Select all

{n} ({y}){" CD$pi"}{".$lang"}
Can somebody help me with this?

Im using Filebot on Windows 8.1 - everything worked fine till yet except of this o_O

Re: Error Message using ".$lang" expression

Posted: 29 Dec 2013, 05:08
by rednoah
You need to setup a sample File so you can test your expression. This file has to be a subtitle file since {lang} will only evaluate for subtitle files and unwind for everything else.

Also it's Warning message. It's perfectly normal for some bindings to not be available depending on your sample data, or actual file/object matches that are being formatted.

Re: Error Message using ".$lang" expression

Posted: 29 Dec 2013, 22:16
by akira2012
Sorry but I don't get the point. I want to use it for subtitle files. Because these are in the folder together with the movie. So I thought it should be possible to add the language to the files because otherwise he would use the same name for different language files... Is this not possible?


EDIT: Sry now I understood (I think). I thought that this information was included in all subtiles files. My fault. So it is not possible to use the binding because it does not exist in my subtitle-files... right? :mrgreen:

Re: Error Message using ".$lang" expression

Posted: 30 Dec 2013, 05:35
by rednoah
If you want the audio language you need to use the {audio} binding.

The {lang} binding is only supported for subtitle files (so you can easily add {lang} to the format without it affecting the movie/episode part).

Movie.avi
Movie.eng.srt

One and the same format for both cases because {lang} will unwind for movie files. {lang} is parsed from the filename if possible, like in the example above, otherwise it'll try use language detection on the contents of the subtitles file, which may or may not be accurate.

PS: Even if you get a warning in the editor it may still work with the actual files. In the end it depends on the actual exact data.

Re: Error Message using ".$lang" expression

Posted: 31 Dec 2013, 00:16
by akira2012
Yes, it did work well. It was just the wrong thinking of myself. Thank you for opening my mind ^^

greets

akira2012