Error Message using ".$lang" expression

Any questions? Need some help?
Post Reply
akira2012
Posts: 5
Joined: 29 Dec 2013, 00:37

Error Message using ".$lang" expression

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

Re: Error Message using ".$lang" expression

Post 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.
:idea: Please read the FAQ and How to Request Help.
akira2012
Posts: 5
Joined: 29 Dec 2013, 00:37

Re: Error Message using ".$lang" expression

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

Re: Error Message using ".$lang" expression

Post 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.
:idea: Please read the FAQ and How to Request Help.
akira2012
Posts: 5
Joined: 29 Dec 2013, 00:37

Re: Error Message using ".$lang" expression

Post by akira2012 »

Yes, it did work well. It was just the wrong thinking of myself. Thank you for opening my mind ^^

greets

akira2012
Post Reply