qBittorrent / Automated Media Center Troubleshooting

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
IAmBroom
Posts: 16
Joined: 18 Jan 2016, 18:44

qBittorrent / Automated Media Center Troubleshooting

Post by IAmBroom »

Win7 SP1, Filebot 4.6.1, and I know I have at least one TV show episode that is not in the amc.excludes list.

My QBittorrent "finished" files are directed to two directories:
Z:/New Movies
Z:/New TV Shows

Here's the output of my test bat file:
Y:\Torrents>filebot -script fn:amc --action duplicate --conflict auto -non-strict --log-file "Y:/Torrents/amc.log" --def excludeList="Y:/Torrents/amc.excludes" unsorted=y music=y artwork=n subtitles=en extras=n clean=y minLengthMS=1800000 "ut_kind=multi" "ut_title=n" "ut_label=n" "ut_dir=" "ut_file=" "seriesFormat=Y:/TV Shows/{n}/{n} - {sxe} {airdate} {t}" "animeFormat=Z:/Movies/Animation/{n}/{fn}" "movieFormat=Z:/Movies/{ny}/{fn}" "musicFormat=Z:/Music/{n}/{fn}"
Locking Y:\Torrents\amc.log
Run script [fn:amc] at [Mon Jan 18 14:05:39 EST 2016]
Parameter: excludeList = Y:/Torrents/amc.excludes
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = n
Parameter: subtitles = en
Parameter: extras = n
Parameter: clean = y
Parameter: minLengthMS = 1800000
Parameter: ut_kind = multi
Parameter: ut_title = n
Parameter: ut_label = n
Parameter: ut_dir =
Parameter: ut_file =
Parameter: seriesFormat = Y:/TV Shows/{n}/{n} - {sxe} {airdate} {t}
Parameter: animeFormat = Z:/Movies/Animation/{n}/{fn}
Parameter: movieFormat = Z:/Movies/{ny}/{fn}
Parameter: musicFormat = Z:/Music/{n}/{fn}
Using excludes: Y:\Torrents\amc.excludes (110)
No files selected for processing
Failure (°_°)
(BTW, TYVM to rednoah for all the work he's done. I've seen this script working, with simpler default values, and it's amazing.)
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: No errors, but no output, either

Post by rednoah »

You're not passing in any files. Obvious by the fact that "New Movies" doesn't appear in your command-line call. :lol:
:idea: Please read the FAQ and How to Request Help.
IAmBroom
Posts: 16
Joined: 18 Jan 2016, 18:44

Re: No errors, but no output, either

Post by IAmBroom »

rednoah wrote:You're not passing in any files. Obvious by the fact that "New Movies" doesn't appear in your command-line call. :lol:
You know, I considered that, but the examples and help topics I found didn't show any way to specify input directory. Is it something embarrassingly obvious like --input "Z:/New Movies" ?
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: No errors, but no output, either

Post by rednoah »

The Troubleshooting should make things clear, and lists this example

Code: Select all

[2013-03-05 20:44:24]  Executing: filebot -script fn:amc --output "D:/Organized Media" --log-file amc.log --action duplicate --conflict override -non-strict --def "ut_dir=D:\Media\Avatar" "ut_file=" "ut_kind=multi" "ut_title=Avatar" "ut_label=" "ut_state=5"
Hint: --def "ut_dir=/path/to/input" where the value for /path/to/input is provided by the torrent client.

@see viewtopic.php?f=4&t=215
:idea: Please read the FAQ and How to Request Help.
IAmBroom
Posts: 16
Joined: 18 Jan 2016, 18:44

Re: No errors, but no output, either

Post by IAmBroom »

This works! Thanks SO MUCH for the clue!
[Edit: I see you provided another way. Thanks for that, too.]
Y:\Torrents>filebot -script fn:amc --action duplicate "Z:/New Movies" "Z:/New TV Shows" --conflict auto -non-strict --log-file "Y:/Torrents/amc.log" --def excludeList="Y:/Torrents/amc.excludes" unsorted=y music=y artwork=n subtitles=en extras=n clean=y minLengthMS=1800000 "ut_kind=multi" "ut_title=n" "ut_label=n" "ut_dir=" "ut_file=" "seriesFormat=Y:/TV Shows/{n}/{n} - {sxe} {airdate} {t}" "animeFormat=Z:/Movies/Animation/{n}/{fn}""movieFormat=Z:/Movies/{ny}/{fn}" "musicFormat=Z:/Music/{n}/{fn}"
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: No errors, but no output, either

Post by rednoah »

You should set --def ut_label=Series when processing TV Series files, and --def ut_label=Movie when processing Movie files.

If you make the amc do auto-detection when it's completely unnecessary you're just making things difficult for yourself.
:idea: Please read the FAQ and How to Request Help.
IAmBroom
Posts: 16
Joined: 18 Jan 2016, 18:44

Re: No errors, but no output, either

Post by IAmBroom »

OK, I don't see how writing 100 characters of text once in my life is "making things difficult", but... now that you've brought it up, how do I let the script know whether it's processing TV or Movies?

Right now I have one script that works for both. It sounds like you're saying I should simplify this by making two scripts, and somehow telling Filebot which one to run depending on which sort of file QBittorrent just downloaded.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: No errors, but no output, either

Post by rednoah »

This is the worst way possible to call the amc script from qBittorrent:

Code: Select all

filebot -script fn:amc --action duplicate "Z:/New Movies" "Z:/New TV Shows" ...
It's particularly bad because some movie files in New Movies will be processed as episodes, and some episode files in New TV Shows will be processed as movies.



This is what the qBittorrent instructions say:

Code: Select all

filebot -script fn:amc --output "/path/to/media" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L"
qBittorrent will replace %F with the actually path to the finished torrent. If a torrent is labelled Series or Movie in qBittorrent then %L is replaced by that value forcing Series or Movie mode.

If you call the script manually with CMD, then you have to replace %F and %L yourself. Normally qBittorrent would do that before making a script call for a particular finished download. See Troubleshooting section for details.



If you do not force Series or Movie mode, then the amc script has to guess, and it will guess wrong in a small number of cases, leading to bad mismatches, erroneously overridden files, and a whole range of unnecessary headaches. Read the other threads for details. :D
:idea: Please read the FAQ and How to Request Help.
IAmBroom
Posts: 16
Joined: 18 Jan 2016, 18:44

Re: qBittorrent / Automated Media Center Troubleshooting

Post by IAmBroom »

Still can't get your suggestion to work, but now because of a new error.

Code: Select all

filebot -script fn:amc --action duplicate --conflict auto -non-strict --log-file "Y:/Torrents/amc.log" --def excludeList="Y:/Torrents/amc.excludes" unsorted=y music=y artwork=n subtitles=en extras=n clean=y minLengthMS=1800000 "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L" "seriesFormat=Y:/TV Shows/{n}/{n} - {sxe} {airdate} {t}" "animeFormat=Z:/Movies/Animation/{n}/{fn}" "movieFormat=Z:/Movies/{ny}/{fn}" "musicFormat=Z:/Music/{n}/{fn}"
Run script [fn:amc] at [Wed Jan 20 23:47:08 EST 2016]
Parameter: excludeList = Y:/Torrents/amc.excludes
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = n
Parameter: subtitles = en
Parameter: extras = n
Parameter: clean = y
Parameter: minLengthMS = 1800000
Parameter: ut_dir = Z:\New TV Shows\DCs.Legends.of.Tomorrow.S01.Special-Their.Time.is.Now.720p.HDTV.x264-BAJSKORV
Parameter: ut_kind = multi
Parameter: ut_title = DCs.Legends.of.Tomorrow.S01.Special-Their.Time.is.Now.720p.HDTV.x264-BAJSKORV
Parameter: ut_label =
Parameter: ut_file =
Parameter: seriesFormat = Y:/TV Shows/{n}/{n} - {sxe} {airdate} {t}
Parameter: animeFormat = Z:/Movies/Animation/{n}/{fn}
Parameter: movieFormat = Z:/Movies/{ny}/{fn}
Parameter: musicFormat = Z:/Music/{n}/{fn}
MalformedInputException: Input length = 1
java.nio.charset.MalformedInputException: Input length = 1
at net.filebot.util.FileSet.feed(FileSet.java:48)
at net.filebot.util.FileSet$feed.call(Unknown Source)
at Script1.run(Script1.groovy:139)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:61)
at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:116)
at net.filebot.Main.main(Main.java:169)
Failure (°_°)
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: qBittorrent / Automated Media Center Troubleshooting

Post by rednoah »

Your excludeList file is invalid. The excludeList file is expected to be a simple UTF-8 encoded text file, one line per file path. Did you manually modify it?

Hint: Microsoft software is known to corrupt plain text files by adding a BOM. The error message suggest that file contains an illegal UTF-8 byte sequence.
:idea: Please read the FAQ and How to Request Help.
IAmBroom
Posts: 16
Joined: 18 Jan 2016, 18:44

Re: qBittorrent / Automated Media Center Troubleshooting

Post by IAmBroom »

Thanks! I finally seem to have found the problem character in the excludes file, and everything now works well.

Thanks so much for all your help.
Post Reply