"-" is not a valid option

Support for Windows users
Post Reply
karanrajpal14
Posts: 23
Joined: 03 May 2015, 16:21

"-" is not a valid option

Post by karanrajpal14 »

Hey,
I just wanted to set-up the AMC script in qBittorrent and I just plugged in my usual naming scheme into your example script but I can't get it to work and for the life of, I can't figure out what the issue is.

Code: Select all

H:\Processing\friends\Joey Season 1 Complete (XviD) Sabi>filebot -script fn:amc --action test --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes "seriesFormat=H:/tvShows/{n.replaceTrailingBrackets().sortName().upperInitial().space(' ')} ({y}){'/Season '+S}/{n.sortName().upperInitial().replaceTrailingBrackets().space(' ')} - {S00E00} - {t.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'") .lowerTrail().replacePart(', Part $1')} [{vf} {vc.replace('HEVC','x265')} {ac} {af.replace('6ch','5.1').replace('3ch','2.1').replace('2ch','2.1')}]" "movieFormat=H:/movies/{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´‘’ʻ""""]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ")}\{n.sortName().upperInitial().space(' ')} ({y}) [IMDB - {rating} {vf}]/{n.sortName().upperInitial().space(' ')} ({y}) [IMDB - {rating} {vf} {vc.replace('HEVC','x265')} {ac} {af.replace('8ch','7.1').replace('6ch','5.1').replace('3ch','2.1').replace('2ch','2.1')}] {' CD'+pi}" "musicFormat={t} - {artist} - {album}" unsorted=y music=y artwork=y subtitles=en storeReport=y deleteAfterExtract=y clean=y plex=localhost:<token> "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L"
"-" is not a valid option
Launch4j: Failed to run the given command.
I have a folder of files that I'd like to test this on but it keeps giving me this error. Also, is there a cleaner way to set up this script as this seems to be too damn messy. Any help would be appreciated!
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: "-" is not a valid option

Post by rednoah »

Cmdline and Argument Passing explains why it's not working. You're not escaping arguments correctly.

I recommend avoiding the intricacies of passing complex arguments on the command-line by using text files.
:idea: Please read the FAQ and How to Request Help.
karanrajpal14
Posts: 23
Joined: 03 May 2015, 16:21

Re: "-" is not a valid option

Post by karanrajpal14 »

rednoah wrote:Cmdline and Argument Passing explains why it's not working. You're not escaping arguments correctly.

I recommend avoiding the intricacies of passing complex arguments on the command-line by using text files.
I just tried to create a text file out of all the args and this is what I came up with:

Code: Select all

excludeList=amc.excludes
seriesFormat=H:/tvShows/{n.replaceTrailingBrackets().sortName().upperInitial().space(' ')} ({y}){'/Season '+S}/{n.sortName().upperInitial().replaceTrailingBrackets().space(' ')} - {S00E00} - {t.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'") .lowerTrail().replacePart(', Part $1')} [{vf} {vc.replace('HEVC','x265')} {ac} {af.replace('6ch','5.1').replace('3ch','2.1').replace('2ch','2.1')}]
movieFormat=H:/movies/{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ")}\{n.sortName().upperInitial().space(' ')} ({y}) [IMDB - {rating} {vf}]/{n.sortName().upperInitial().space(' ')} ({y}) [IMDB - {rating} {vf} {vc.replace('HEVC','x265')} {ac} {af.replace('8ch','7.1').replace('6ch','5.1').replace('3ch','2.1').replace('2ch','2.1')}] {' CD'+pi}
musicFormat={t} - {artist} - {album}
unsorted=y
music=y
artwork=y
subtitles=en
storeReport=y
deleteAfterExtract=y
clean=y
plex=localhost:RzwxzAjtNXdnGTkcNB2k
ut_dir="%F"
ut_kind="multi"
ut_title="%N"
ut_label="%L"
For the last few args you've surrounded them with quotation marks but if I'm not wrong, I don't need to do that in the text file. Correct?
qBittorrent asked me to surround params with quotation marks to avoid being cut-off at white-spaces so I've done that. I this correct? I'd just like to confirm it first.

Also, can't I run AMC outside of a torrent program? Just for testing purposes as I can't download something new every time I want to test something.
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: "-" is not a valid option

Post by rednoah »

1.
The %variables in the command are replaced by qBT real values. If you put them in the arguments file then qBT won't be able to do that.


2.
filebot is always run "outside of the torrent program". qBT can run commands just like you can run commands from the command-line. FileBot cannot know if it's called by qBT or you.

Please read the Troubleshooting section.
:idea: Please read the FAQ and How to Request Help.
karanrajpal14
Posts: 23
Joined: 03 May 2015, 16:21

Re: "-" is not a valid option

Post by karanrajpal14 »

Hey,
I got everything to work. Just one last question, the artwork that's being downloaded is plex compatible or will plex do it's own thing?
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: "-" is not a valid option

Post by rednoah »

I have no idea. If it's not, figure out why and report the issue. ;)
:idea: Please read the FAQ and How to Request Help.
karanrajpal14
Posts: 23
Joined: 03 May 2015, 16:21

Re: "-" is not a valid option

Post by karanrajpal14 »

It seems to be working. Will have to test it extensively once I set up a new library. Thank you so much for your help, I appreciate it!
Post Reply