Has anyone else had this issue with qBT and resolved it?
This is what qBT is set to run:
Code: Select all
"C:\Program Files (x86)\Python38-32\pythonw.exe" "C:\qtorret-postprocess.pyw" "%L" "" "%N" "multi" "" "%F"
This is my script right now:
Code: Select all
# Run Program uTorrent:
# "C:\qtorrent-postprocess.pyw" "%L" "%S" "%N" "%K" "%F" "%D"
#
# Run Program qTorrent:
# "C:\qtorrent-postprocess.pyw" "%L" "" "%N" "multi" "" "%F"
#
# Test with Console:
# python "C:\qtorrent-postprocess.pyw" "Movie" "5" "Avatar" "multi" "" "X:\Files\Avatar"
import sys
import subprocess
# configuration
output = '\\\\hostipaddress\Plex'
# 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', '/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,
'subtitles=en',
'plex=IPAddress:token'
]
# 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)
This is my output:
Code: Select all
Run script [fn:amc] at [Thu Dec 05 12:05:18 CST 2019]
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: movieFormat = {plex}
Parameter: seriesFormat = {plex}
Parameter: animeFormat = {plex}
Parameter: musicFormat = {plex}
Parameter: ut_label = %L
Parameter: ut_state =
Parameter: ut_title = %N
Parameter: ut_kind = multi
Parameter: ut_file =
Parameter: ut_dir = %F
Parameter: subtitles = en
Parameter: plex = *****
Bad ut_label value: %L
Bad ut_title value: %N
Bad ut_dir value: %F
Illegal usage: no input
Failure (°_°)