Need help with language tag

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
djtlg
Posts: 2
Joined: 11 Jan 2014, 07:01

Need help with language tag

Post by djtlg »

Hi

I am trying to get my media center automated. I am using plex as the media server an it requires subtitles to have .eng before the extension in order to recognize it. This is the code i have so far,

Code: Select all

filebot -script fn:amc --output "******" --action test -non-strict "*******" --def "seriesFormat=TV Shows/{n}/Season{s.pad(2)}/{n}.{s00e00}{lang}" music=n subtitles=en artwork=n backdrops=n clean=y
My problem is that this code doesn't put a .(dot) before adding the language tag. eg: Sherlock.S03E01eng.srt
And if I write the code like

Code: Select all

filebot -script fn:amc --output "*******" --action test -non-strict "******" --def "seriesFormat=TV Shows/{n}/Season{s.pad(2)}/{n}.{s00e00}.{lang}" music=n subtitles=en artwork=n backdrops=n clean=y
then it would add a .(dot) to the video file too. eg: Sherlock.S03E01..mkv

Please help
Thanks
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help with language tag

Post by rednoah »

:idea: Please read the FAQ and How to Request Help.
djtlg
Posts: 2
Joined: 11 Jan 2014, 07:01

Re: Need help with language tag

Post by djtlg »

rednoah wrote:Movie Section - Example #1
http://www.filebot.net/forums/viewtopic.php?f=5&t=2
I tried that and i ended up with an error.

This is the code

Code: Select all

filebot -script fn:amc --output "*******" --action test -non-strict "******" --def "seriesFormat=TV Shows/{n}/Season{s.pad(2)}/{n}.{s00e00}{".$lang"}" music=n subtitles=en artwork=n backdrops=n clean=y
and this is the error

Code: Select all

Missing property name after reference operator.
At line:1 char:169
+ filebot -script fn:amc --output "D:/Desktop/Torrent" --action test -non-strict "D:/Desktop/Torrent/tv" --def "seriesF
ormat=TV Shows/{n}/Season{s.pad(2)}/{n}.{s00e00}{". <<<< $lang"}" music=n subtitles=en artwork=n backdrops=n clean=y
    + CategoryInfo          : ParserError: (.:String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingPropertyName
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need help with language tag

Post by rednoah »

You're cmdline call is wrong. Learn how to properly escape arguments first.

FAQ says:
Q: I'm trying to run FileBot from the console, but I'm having trouble passing in --format because of spaces or double-quotes
A: You need to pass in arguments correctly. "..." allows you to pass in one argument that may contains spaces. Of course since " is a special character in argument parsing you'll need to escape each " with \" if you want to pass in the literal value. e.g. "This is called \"escaping\"." will pass in this sentence as one argument.
EDIT:
Why do you override the default format anyway? Just don't don't specify any format options and let it use the default values which work perfectly with any media center.
:idea: Please read the FAQ and How to Request Help.
Post Reply