AMC not working in Windows Qbitorrent 4.10

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Silvercloak
Posts: 14
Joined: 12 May 2018, 01:46

AMC not working in Windows Qbitorrent 4.10

Post by Silvercloak »

I'm stumped. I can't find my AMC.log so I'm uncertain what the problem here is. This is what I have in my QBittorrent for file execution

Code: Select all

"C:\Users\Penne\AppData\Local\Programs\Python\Python36-32\python.exe" "E:\Media\utorrent-postprocess.pyw" "%L" "" "%N" "multi" "" "%F"
and inside the postprocess is;

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 = 'E:/Media'


# 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 + 'C:/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)
I don't know if I'm supposed to do anything else. I've followed the instructions at

viewtopic.php?t=215

As closely as I understood them. If I've missed something - or am supposed to change something in Filebot - please let me know. Thanks for any help in advance.

Silvercloak
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC not working in Windows Qbitorrent 4.10

Post by rednoah »

NO:

Code: Select all

'--log-file', output + 'C:/amc.log',
Because E:/MediaC:/amc.log probably isn't a valid path...


YES:

Code: Select all

'--log-file', 'C:/amc.log',
Because you want your log file to go to C:/amc.log. Now we can have a look at the log. :lol:


DEFAULT:

Code: Select all

'--log-file', output + '/amc.log',
The default location would have put the log at E:/Media/amc.log which should be rather easy to find. ;)
:idea: Please read the FAQ and How to Request Help.
Silvercloak
Posts: 14
Joined: 12 May 2018, 01:46

Re: AMC not working in Windows Qbitorrent 4.10

Post by Silvercloak »

I don't get it... it's not generating the log at all. I've even downgraded to 4.0.3 of Qbitorrent and changed how it called the program to

Code: Select all

"E:\Media\utorrent-postprocess.pyw" "%L" "" "%N" "multi" "" "%F"
No log is created... So I have no way to know of what's happening behind the scenes.

Again this is what I've got in the postprocess file now;

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 = 'E:/Media'


# 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', 'C:/Logs/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)
I really don't want to switch to Utorrent since that prog is loaded with ads. I'm totally stumped. Is there some settings file for Filebot I'm not aware of? Is there another setting in Qbittorrent I need to change?

Silvercloak
ZeroByDivide
Posts: 170
Joined: 16 Dec 2014, 01:39

Re: AMC not working in Windows Qbitorrent 4.10

Post by ZeroByDivide »

Silvercloak wrote: 12 May 2018, 18:03 I don't get it... it's not generating the log at all. I've even downgraded to 4.0.3 of Qbitorrent and changed how it called the program to

Code: Select all

"E:\Media\utorrent-postprocess.pyw" "%L" "" "%N" "multi" "" "%F"
No log is created... So I have no way to know of what's happening behind the scenes.

Again this is what I've got in the postprocess file now;

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 = 'E:/Media'


# 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', 'C:/Logs/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)
I really don't want to switch to Utorrent since that prog is loaded with ads. I'm totally stumped. Is there some settings file for Filebot I'm not aware of? Is there another setting in Qbittorrent I need to change?

Silvercloak
Okay let's try this. Change

Code: Select all

"E:\Media\utorrent-postprocess.pyw" "%L" "" "%N" "multi" "" "%F"
to

Code: Select all

"E:\Media\utorrent-postprocess.py" "%L" "" "%N" "multi" "" "%F"
and in the utorrent-postprocess script take out the

Code: Select all

creationflags=0x08000000
for a moment, and add

Code: Select all

input()
on a new line after the

Code: Select all

subprocess.run(command, creationflags=0x08000000)
and then have qbittorrent try to run the script again and either grab a screenshot or copy the text of the CMD window that comes up if there are any errors.

if things work then upgrade back to 4.1.0 of qbittorrent and do the same thing but of course add your

Code: Select all

"C:\Users\Penne\AppData\Local\Programs\Python\Python36-32\python.exe"
to the beginning of your qbittorrent call if that works then change everything back to how it used to be, and change

Code: Select all

"C:\Users\Penne\AppData\Local\Programs\Python\Python36-32\python.exe"
to

Code: Select all

"C:\Users\Penne\AppData\Local\Programs\Python\Python36-32\pythonw.exe"
one question as well, what version of python are you using?
Silvercloak
Posts: 14
Joined: 12 May 2018, 01:46

Re: AMC not working in Windows Qbitorrent 4.10

Post by Silvercloak »

I just saw your message now. Good news though; I started tinkering in the commandline level and realized that none of the switches were being accepted by Filebot. The version I had turned out to be too old. I went to the windows store and purchased the newest version and removed the old version.

Now everything is working PERFECTLY in 4.0.3. I'll try upgrading to the newer version and if I run into trouble I'll refer to this message you just left me.

Thanks so much!!

Silvercloak
Post Reply