Page 1 of 1
Filebot Doesn't Trigger, No Entry in Log
Posted: 04 Aug 2017, 04:05
by alexander_q
Sysinfo (Windows Store):
Code: Select all
FileBot 4.7.12 (r5171)
JNA Native: 5.1.0
MediaInfo: 0.7.93
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 1.8.0_141
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 3 GB Max Memory / 39 MB Used Memory
OS: Windows 10 (amd64)
Package: APPX
Done ?(?????)?
Using qBittorrent v3.3.15 x64 to run script upon download completion:
Code: Select all
filebot.launcher -script fn:amc --output "D:" --log-file D:/amc.log --action move --conflict override -non-strict --def music=n artwork=n clean=y unsorted=y reportError=y "seriesFormat=D:/_TV Shows/{n}/{'Season '+s}/{fn}" "movieFormat=D:/_Movies/{n} ({y})/{fn}" excludeList=amc.txt "%F"
After download, filebot does not operate, and no entry appears in amc.log. Can you help me to solve the problem?
Re: Filebot Doesn't Trigger, No Entry in Log
Posted: 04 Aug 2017, 04:07
by rednoah
These links should give you some tips on how to tackle the problem:
viewtopic.php?f=4&t=3067
viewtopic.php?f=4&t=5157
filebot.launcher.exe does not exist anymore so that might be the obvious issue here.
Re: Filebot Doesn't Trigger, No Entry in Log
Posted: 06 Aug 2017, 03:26
by alexander_q
Thanks rednoah. Are these new requirements as a result of an update (everything was running swimmingly, until it wasn't running at all)?
I'm stuck at the step "Fetch the utorrent-postprocess.pyw python script and modify it to your needs". Is "Fetch" some Python terminology? Could you break it down for me? Also, "modify it to your needs"... Am I able to paste my existing script into the file as is?
Re: Filebot Doesn't Trigger, No Entry in Log
Posted: 06 Aug 2017, 03:41
by rednoah
"Fetch" is a synonym for "Download" like when you click "Save As..." in your browser to save a page in your browser as file on your computer.
Re: Filebot Doesn't Trigger, No Entry in Log
Posted: 06 Aug 2017, 03:52
by alexander_q
Thanks, I tend to assume things are more complicated than they are... Here's where I'm at:
The contents of my python script:
Code: Select all
# Run Program:
# "C:\path\to\utorrent-postprocess.pyw" "%L" "%S" "%N" "%K" "%F" "%D"
#
# Test with Console:
# python "C:\path\to\utorrent-postprocess.pyw" "Movie" "5" "Avatar" "multi" "" "X:\Files\Avatar"
import sys
import subprocess
# configuration
output = 'D:/'
# custom formats (use / instead of \ as directory separator)
movieFormat = '''{plex}'''
seriesFormat = '''{plex}'''
animeFormat = '''{plex}'''
musicFormat = '''{plex}'''
# required args
label, state, title, kind, file, directory = sys.argv[1:7]
command = [
'filebot', '-script', 'fn:amc',
'--output', output,
'--action', 'duplicate',
'--conflict', 'skip',
'-non-strict',
'--log-file', output + 'D:/amc.log',
'--def',
'unsorted=y',
'music=y',
'artwork=y',
'movieFormat=' + movieFormat,
'seriesFormat=' + seriesFormat,
'animeFormat=' + animeFormat,
'musicFormat=' + musicFormat,
'ut_label=' + label,
'ut_state=' + state,
'ut_title=' + title,
'ut_kind=' + kind,
'ut_file=' + file,
'ut_dir=' + directory
]
# execute command only for certain conditions (disabled by default)
'''
if state not in ['5', '11']:
print('Illegal state: %s' % state)
sys.exit(0)
'''
# execute command (and hide cmd window)
subprocess.run(command, creationflags=0x08000000)
When I run it from command, I get "ValueError: not enough values to unpack". When I run it with parameters '"%L" "" "%N" "multi" "" "%Fâ" I get no output in console.
In qBittorrent I have:
Code: Select all
"D:\utorrent-postprocess.pyw" "%L" "" "%N" "multi" "" "%Fâ
When testing a torrent, upon dowload completion nothing happens. No update in log, no errors anywhere. In one of your above links on debugging you mention adding "printenv > "/path/to/log.txt"". In the context of the python script, where would I add such a line?
Thanks.
Re: Filebot Doesn't Trigger, No Entry in Log
Posted: 06 Aug 2017, 04:07
by rednoah
1.
Change this line.
DO NOT change any other lines unless you know what you're doing.
Code: Select all
# configuration
output = 'X:/Media'
2.
Use copy & paste to copy and paste code VERBATIM from the example, and don't change anything that doesn't need to be changed.
In this case, you have replaced " with â which is a completely different character. Looks similar, but can't be used interchangeably. Did you use Microsoft Word to write code?
DO NOT use Microsoft Word. Please use Notepad++ instead.
YES:
NO:
3.
You can test your script from the command-line like so:
Code: Select all
python "C:\path\to\utorrent-postprocess.pyw" "Movie" "5" "Avatar" "multi" "" "X:\Files\Avatar"
Re: Filebot Doesn't Trigger, No Entry in Log
Posted: 06 Aug 2017, 04:35
by alexander_q
1. I did change this line to "output = 'D:/'", see above.
2. Thanks, fixed
3. What is the expected result of such a test, i.e, how will I know if it has succeeded or failed? When I do it, there is no ouput in the console of any kind.
I have tried again, still nothing happens, no output in amc.log.
Re: Filebot Doesn't Trigger, No Entry in Log
Posted: 06 Aug 2017, 05:32
by rednoah
1.
Are you sure you didn't change anything else? Because you also changed the log location to D:/D:/amc.log which doesn't make sense.
YES
YES
NO
Code: Select all
'--log-file', output + 'D:/amc.log',
2.
If you change the last line then you can enable the console.
WITHOUT console:
Code: Select all
subprocess.run(command, creationflags=0x08000000)
WITH console: