[GUIDE] Fully Automated Media Center with qBittorrent
Re: [GUIDE] Fully Automated Media Center with qBittorrent
The variables changed, so %f is now %F and there's new ones as well. The command template changed, but even if you use the old one, filebot should still be called, so there should be logs. If there's no logs, then filebot is never started.
If something is not working, and you don't know why, but still use filebot.launcher.exe instead of filebot.exe, then really really shouldn't use filebot.launcher.exe in the first place, until you know what you're doing.
If something is not working, and you don't know why, but still use filebot.launcher.exe instead of filebot.exe, then really really shouldn't use filebot.launcher.exe in the first place, until you know what you're doing.
Re: [GUIDE] Fully Automated Media Center with qBittorrent
Sod this.. I've not got time to mess around trying to fix it. I've gone back to 3.2.5 and it's working fine. If it doesn't even execute filebot and, as I said, there's no mention of it failing at anything in the qbittorrent logs. No sign of java in task manager.. it's got to be a bug in 3.3.
I don't know what you are referring to regarding not using filebot.launcher.exe instead of filebot.exe... what's the difference? The UI isn't popping up.. is there a technical reason why I shouldn't use it? It's not difficult to edit either way.
I don't know what you are referring to regarding not using filebot.launcher.exe instead of filebot.exe... what's the difference? The UI isn't popping up.. is there a technical reason why I shouldn't use it? It's not difficult to edit either way.
Re: [GUIDE] Fully Automated Media Center with qBittorrent
filebot.exe is a Console application, filebot.launcher.exe is a GUI application.
If you see the Console, you know that it's called, and you'll see all the output. If you don't have a Console you will see nothing, you won't know if it's called, and you won't know when/where/how it failed.
qBittorrent doesn't log output of external commands, but if it did, using filebot.launcher.exe would also make that impossible.
Try something simple, like calling notepad, to confirm that the "run command" feature is working or not.
If you see the Console, you know that it's called, and you'll see all the output. If you don't have a Console you will see nothing, you won't know if it's called, and you won't know when/where/how it failed.
qBittorrent doesn't log output of external commands, but if it did, using filebot.launcher.exe would also make that impossible.
Try something simple, like calling notepad, to confirm that the "run command" feature is working or not.
Re: [GUIDE] Fully Automated Media Center with qBittorrent
Sorry for taking so long to get back to you rednoah. I wanted to let my scripts run for a while before confirming whether or not I got things right. It may be a little late, but here it is anyway:
--def "ut_label=%L" "%F" has been working like a charm for me so far. --def "ut_dir=%F" "ut_kind=multi" "ut_label=%L" has been working just as well (leaving ut_file completely unspecified). I am not sure which of the two working alternatives is the most advisable.
Related side note: while %F would refer to the folder in previous versions, it now appends to the filename as well in the case of single file torrents, which AMC seems more than happy to handle. The heavy reliance on the exclude list for single file torrents described earlier in this topic should not be an issue anymore.
I would have toyed with ut_title=%N and/or whatever may be an appropriate equivalent for ut_state as well, but I am simply not quite sure what these parameters are intended to accomplish in the first place.
Reading through this topic, I would also point out that qbittorrent now comes with a warning that its parameters are case sensitive (and upper case: could that be your problem joedo?).
NB: All tests were done on qbittorrent 3.3.0 & Windows 7. If there are any additional scripts/tests to run on qbittorrent, I am happy to do so and provide whatever logs may be useful.
See a few useless examples below.
*read with Bart Simpson's voice* HAHAHA! He can't even find the most basic TV show now.
Good boy...
No 'TV' or 'Show' in the path either and you can still find it? Well done mate.
Wasn't there a Simpsons movie? I really expected something to get fucked up here...
Alright, let's play along:
Well, that was an unexpected match. You've got a dirty mind my dear sir.
Conclusion: While AMC's log remained mostly clean while dealing with whatever creative tagging I could think of, some amount of dirtyness remained unavoidable since AMC insists on sticking its nose (or any other body part I would suppose) into any download tagged as a "Dirty Movie".
The only issues I have left merely seem to stem from my crappy scripting capabilities which fail at processing subtitles in the way I want them too. Nothing I can blame on either filebot or qbittorrent I am afraid.
--def "ut_label=%L" "%F" has been working like a charm for me so far. --def "ut_dir=%F" "ut_kind=multi" "ut_label=%L" has been working just as well (leaving ut_file completely unspecified). I am not sure which of the two working alternatives is the most advisable.
Related side note: while %F would refer to the folder in previous versions, it now appends to the filename as well in the case of single file torrents, which AMC seems more than happy to handle. The heavy reliance on the exclude list for single file torrents described earlier in this topic should not be an issue anymore.
I would have toyed with ut_title=%N and/or whatever may be an appropriate equivalent for ut_state as well, but I am simply not quite sure what these parameters are intended to accomplish in the first place.
Reading through this topic, I would also point out that qbittorrent now comes with a warning that its parameters are case sensitive (and upper case: could that be your problem joedo?).
NB: All tests were done on qbittorrent 3.3.0 & Windows 7. If there are any additional scripts/tests to run on qbittorrent, I am happy to do so and provide whatever logs may be useful.
See a few useless examples below.
Code: Select all
Parameter: ut_label = ignore
Input: random episode from the Simpsons
Finished without processing any files
Code: Select all
Parameter: ut_label = TV Shows
Input: random episode from the Simpsons
Rename episodes using [TheTVDB]
Code: Select all
Parameter: ut_label =
Input: random episode from the Simpsons
Rename episodes using [TheTVDB]
Code: Select all
Parameter: ut_label = Movies
Input: random episode from the Simpsons
Finished without processing any files
Alright, let's play along:
Code: Select all
Parameter: ut_label = Dirty Movies
Input: random episode from the Simpsons
Rename episodes using [TheTVDB]
Conclusion: While AMC's log remained mostly clean while dealing with whatever creative tagging I could think of, some amount of dirtyness remained unavoidable since AMC insists on sticking its nose (or any other body part I would suppose) into any download tagged as a "Dirty Movie".
The only issues I have left merely seem to stem from my crappy scripting capabilities which fail at processing subtitles in the way I want them too. Nothing I can blame on either filebot or qbittorrent I am afraid.
-
- Posts: 170
- Joined: 16 Dec 2014, 01:39
Re: [GUIDE] Fully Automated Media Center with qBittorrent
Dunno why this is happening for me but I recently updated filebot to the latest version (I'm running the portable version btw) but when ever I download a show/movie/anime/whatever, filebot never seems to work correctly anymore.
I'm currently running filebot 4.6.1
Qbittorrent 3.3.1
Every time I download a movie or tv show I always get this error -
and this is how my script looks like inside of qbittorent -
The same code was working before I updated to the latest version of filebot but even doing a downgrade doesn't fix it..
now the thing is I dunno where it's pulling this whole ut_kind thing out of since I don't have it in my code since qbittorent doesn't support ut_kind at all. I've tried downgrading both qbittorent and filebot to earlier versions already to see if that would fix it but to no avail at all
so I'm currently lost on what the issue could be, hopefully someone can help me out with what the issue is.
I'm currently running filebot 4.6.1
Qbittorrent 3.3.1
Every time I download a movie or tv show I always get this error -
Code: Select all
Run script [fn:amc] at [Tue Dec 08 11:07:09 CST 2015]
Parameter: subtitles = en
Parameter: deleteAfterExtract = y
Parameter: clean = y
Parameter: ut_title = Quantico.S01E10.HDTV.x264-LOL[ettv]
Parameter: ut_label =
Parameter: ut_file = C:\Users\timta\Desktop\QBT\Quantico.S01E10.HDTV.x264-LOL[ettv]
Parameter: ut_dir = C:\Users\timta\Desktop\QBT\
MissingPropertyException: No such property: ut_kind for class: Script1
groovy.lang.MissingPropertyException: No such property: ut_kind for class: Script1
at Script1.run(Script1.groovy:183)
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:114)
at net.filebot.Main.main(Main.java:169)
Failure (°_°)
Code: Select all
filebot -script fn:amc --output "C:/Users/timta/Videos" --log-file amc.log --conflict auto -non-strict --filter "age < 250" --def subtitles=en deleteAfterExtract=y clean=y "ut_title=%N" "ut_label=%L" "ut_file=%F" "ut_dir=%D"
now the thing is I dunno where it's pulling this whole ut_kind thing out of since I don't have it in my code since qbittorent doesn't support ut_kind at all. I've tried downgrading both qbittorent and filebot to earlier versions already to see if that would fix it but to no avail at all

Re: [GUIDE] Fully Automated Media Center with qBittorrent
1.
If my call says --def ut_kind=multi and works... but your call doesn't and fails with an error regarding ut_kind... I'm sure you'll figure it out.
@see viewtopic.php?f=4&t=215#p9774
2.
Apparently %F is the a file/folder the downloaded files, whereas %D is the downloads folder that contains everything:
Is there any particular reason why you don't stick to the recommended usage?
@see viewtopic.php?f=4&t=215#p9774
If my call says --def ut_kind=multi and works... but your call doesn't and fails with an error regarding ut_kind... I'm sure you'll figure it out.

@see viewtopic.php?f=4&t=215#p9774
2.
Apparently %F is the a file/folder the downloaded files, whereas %D is the downloads folder that contains everything:
Code: Select all
Parameter: ut_file = C:\Users\timta\Desktop\QBT\Quantico.S01E10.HDTV.x264-LOL[ettv]
Parameter: ut_dir = C:\Users\timta\Desktop\QBT\
Code: Select all
"ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L"
-
- Posts: 170
- Joined: 16 Dec 2014, 01:39
Re: [GUIDE] Fully Automated Media Center with qBittorrent
Well I didn't think ut_kind was needed since it always worked before without it, it just recently stopped working once I did the update to filebot from 4.6 to 4.6.1 .. as for the second thing I don't really have an answer for that, was just an extra I added in on accident.
anyways that looks to have fixed it though.. dunno why it worked before without ut_kind and now it doesn't work unless it has ut_kind...
anyways that looks to have fixed it though.. dunno why it worked before without ut_kind and now it doesn't work unless it has ut_kind...
Re: [GUIDE] Fully Automated Media Center with qBittorrent
ut_kind is needed if both ut_dir and ut_file is specified
PS: make sure you're not accidentally processing your entire downloads folder over and over
PS: make sure you're not accidentally processing your entire downloads folder over and over

-
- Posts: 170
- Joined: 16 Dec 2014, 01:39
Re: [GUIDE] Fully Automated Media Center with qBittorrent
Ah well that would explain my problem then xD and haha I'm not processing my entire downloads folder over and over, always goes through the folder for the torrent download and that's it after it renames and moves the file to the correct place and deletes left over files the script stops like it should.
-
- Posts: 11
- Joined: 12 Aug 2015, 15:21
Re: [GUIDE] Fully Automated Media Center with qBittorrent
Just FYI for those who updated to qBittorent 3.3.5, a length limit was accidentally imposed on the external command length. See github comment: https://github.com/qbittorrent/qBittorrent/issues/5399
Most likely this means your downloads aren't being processed by the AMC script. It looks like it's being fixed, but if you happen to get the following error in your qBittorrent log, that's why.
@rednoah - Thank you for creating and supporting a fantastic piece of software. I never realized how much I relied on it until it wasn't there / being used. I tried donating 3 times just now but PP is being difficult. I'll keep trying until you get the donation.
[edit] fourth time's a charm. Thank you.
Most likely this means your downloads aren't being processed by the AMC script. It looks like it's being fixed, but if you happen to get the following error in your qBittorrent log, that's why.
Code: Select all
run external program command too long (length > 260), execution failed.
[edit] fourth time's a charm. Thank you.
Re: [GUIDE] Fully Automated Media Center with qBittorrent
OK, glad it wasn't just me. I just spent the last hour or so trying to figure out why amc wasn't working anymore. I finally got it working by reverting back to qBittorrent 3.3.3.Just FYI for those who updated to qBittorent 3.3.5, a length limit was accidentally imposed on the external command length. See github comment: https://github.com/qbittorrent/qBittorrent/issues/5399
Most likely this means your downloads aren't being processed by the AMC script. It looks like it's being fixed, but if you happen to get the following error in your qBittorrent log, that's why.
Also, obligatory thank you to rednoah, donation sent your way as well!
Re: [GUIDE] Fully Automated Media Center with qBittorrent
1.
Use @file syntax to pass command-line arguments (e.g. lengthy format expressions) via external text files:
viewtopic.php?f=3&t=3244
2.
Use @file syntax to pass command-line arguments (e.g. lengthy format expressions) via external text files:
viewtopic.php?f=3&t=3244
2.
I guess that's the definition of successful technologies: become invisible and taken for grantedI never realized how much I relied on it until it wasn't there / being used

-
- Posts: 1
- Joined: 22 Jun 2016, 13:22
Re: [GUIDE] Fully Automated Media Center with qBittorrent
Could someone possibly give an example of this? I'm having trouble understanding what I need to do to set this up. I'm trying to use these arguments to process files.rednoah wrote:1.
Use @file syntax to pass command-line arguments (e.g. lengthy format expressions) via external text files:
viewtopic.php?f=3&t=3244
Code: Select all
"C:/Program Files/FileBot/filebot.launcher.exe" -script fn:amc --output "D:/Windows Related/Videos" --log-file amc.log --action copy --conflict override -non-strict --def music=y artwork=n clean=y deleteAfterExtract=y excludeList=amc.txt "ut_dir=%F" "ut_kind=multi" "ut_title=%N"
-
- Posts: 11
- Joined: 12 Aug 2015, 15:21
Re: [GUIDE] Fully Automated Media Center with qBittorrent
My guess is your command would be something like:filebotuser wrote: Could someone possibly give an example of this? I'm having trouble understanding what I need to do to set this up. I'm trying to use these arguments to process files.
Code: Select all
"C:/Program Files/FileBot/filebot.launcher.exe" -script fn:amc --output "D:/Windows Related/Videos" --log-file amc.log --action copy --conflict override -non-strict --def @"D:/arguments.txt"
Code: Select all
music=y
artwork=n
clean=y
deleteAfterExtract=y
excludeList=amc.txt
"ut_dir=%F"
"ut_kind=multi"
"ut_title=%N"
Re: [GUIDE] Fully Automated Media Center with qBittorrent
qBT won't be able to replace the %variables if you do it like that though...
It'll look more like this:
It'll look more like this:
Code: Select all
filebot @/path/to/args.txt --def "ut_dir=%F" "ut_kind=multi" "ut_title=%N"
-
- Posts: 11
- Joined: 12 Aug 2015, 15:21
Re: [GUIDE] Fully Automated Media Center with qBittorrent
Thanks for the correction. qBT properly parses the command now, I didn't know I could move everything but the %variables to the args.txt file. Thanks for the great tip. Unfortunately the command still fails, since with both %F and %N the command is still longer than 260 characters. My torrent names just happen to be too damn long.rednoah wrote:qBT won't be able to replace the %variables if you do it like that though...
I presumably need both "ut_dir=%F and "ut_title=%N" for filebot to process correctly, right? Would I be able to get by with just "ut_dir=%F" since %F also appends the file name or does Filebot need both ut_dir and ut_title to function properly?
Re: [GUIDE] Fully Automated Media Center with qBittorrent
You might be able to get away with not passing in ut_title.
-
- Posts: 11
- Joined: 12 Aug 2015, 15:21
Re: [GUIDE] Fully Automated Media Center with qBittorrent
@rednoah - If I should start a new thread to not hijack this one, please let me know and I'll do it.
I'm not sure if removing ut_title worked or not. I tried both with and without both ut_title and ut_dir but FileBot wasn't being called from qBT. Checked both FileBot and qBT logs but no external command call. I downgraded to qBT 3.3.4 and then 3.3.3 each time trying a combination of different commands, but still no FileBot call. Frustrated, I tried your tip to use cmd and fill in qBT's variables to see wtf is going on. This is what I got.
I'm running windows java 8.0.910.14, FileBot version 4.7.
The file name looks right, from your tutorial. Same with the directory name and volume label syntax. The %variables have the correct slash direction "\" as qBT would output, and I'm using the correct slash direction "/" from your tutorial for the program call. I tried used launcher and platform.launcher exe's in CMD but only the regular exe outputted the error.
I must be missing something obvious. Does anything jump out at you (besides that I'm using Windows)? I'd really appreciate the advice.
Here's my external command and args.txt:
I'm not sure if removing ut_title worked or not. I tried both with and without both ut_title and ut_dir but FileBot wasn't being called from qBT. Checked both FileBot and qBT logs but no external command call. I downgraded to qBT 3.3.4 and then 3.3.3 each time trying a combination of different commands, but still no FileBot call. Frustrated, I tried your tip to use cmd and fill in qBT's variables to see wtf is going on. This is what I got.
Code: Select all
Error during startup: The filename, directory name, or volume label syntax is incorrect
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
at net.filebot.Main.initializeLogging(Main.java:397)
at net.filebot.Main.main(Main.java:106)
Launch4j: Failed to run the given command.
The file name looks right, from your tutorial. Same with the directory name and volume label syntax. The %variables have the correct slash direction "\" as qBT would output, and I'm using the correct slash direction "/" from your tutorial for the program call. I tried used launcher and platform.launcher exe's in CMD but only the regular exe outputted the error.
I must be missing something obvious. Does anything jump out at you (besides that I'm using Windows)? I'd really appreciate the advice.
Here's my external command and args.txt:
Code: Select all
"C:/Program Files/FileBot/filebot.launcher.exe" @"K:/args.txt" --def "ut_dir=%F" "ut_kind=multi" "ut_title=%N"
Code: Select all
-script fn:amc
--output "Z:"
--log-file "K:/amc.log"
--action copy
...
Last edited by thebestnumberis42 on 26 Jun 2016, 03:58, edited 1 time in total.
Re: [GUIDE] Fully Automated Media Center with qBittorrent
1 line = 1 argument
Use -script fn:sysenv to see the argument array you're passing in, and see if it makes sense.
Code: Select all
-script
fn:amc
--output
Z:
--log-file
K:/amc.log
...
-
- Posts: 11
- Joined: 12 Aug 2015, 15:21
Re: [GUIDE] Fully Automated Media Center with qBittorrent
Thanks for the tip rednoah - I finally got it working. FYI to others trying to use an arguments text file, make sure there's no extra white spaces anywhere, especially at the end of commands. Was hunting awhile for my syntax error until I found the damn white space.
Unfortunately I still had to downgrade qBT to 3.3.3, since even with the args txt file, the external command was too long for 3.3.5. I'll upgrade once they fix the problem, but at least now I know how the arg txt file formats work.
Here's my final command and arg txt file in case anyone wants to reference it. Thanks again rednoah.
external command
args.txt
Unfortunately I still had to downgrade qBT to 3.3.3, since even with the args txt file, the external command was too long for 3.3.5. I'll upgrade once they fix the problem, but at least now I know how the arg txt file formats work.
Here's my final command and arg txt file in case anyone wants to reference it. Thanks again rednoah.
external command
Code: Select all
"C:/Program Files/FileBot/filebot.launcher.exe" @"K:/args.txt" --def "ut_dir=%F" "ut_kind=multi" "ut_title=%N"
Code: Select all
-script
fn:amc
--output
Z:
--log-file
K:/amc.log
--action
copy
--conflict
override
-non-strict
--def
music=n
artwork=n
reportError=y
pushover=***
seriesFormat=X:/TV/{n}/{'Season '+s}/{n} - {sxe} - {t}
movieFormat=Z:/Movies/{n} ({y})/{n} ({y})
excludeList=K:/amc.txt
Re: [GUIDE] Fully Automated Media Center with qBittorrent
Hi All,
First I would like to thank for this Topic. I would like to create the Automated Media Center using Filebot and qBittorrent. The current setup that i have is as follows:
Qbit is downloading all torrents to a folder on a NAS called Z:/Downloads (obviously local drive)
Airvideo HD Server is running using this Z:/Downloads location as a source of the video files. No other files besides TV Shows and Movies are being downloaded in this folder.
My question would be:
- What would be the script to run if I want the FileBot just to run through the new downloaded files and download subtitles for them, without renaming, copying, moving or any other action to be performed for those video files.
I've tried few times to set it up and I experienced the following issues
- Not always the subtitles are downloaded - Bulgarian and English - using this command - subtitles=en, bg
- It ran through the Download Location and reorganize my files - Create new folder structure for the Movies/TV Shows, Rename the actual video file
I would appreciate your support and I'm looking forward for your reply.
Regards,
First I would like to thank for this Topic. I would like to create the Automated Media Center using Filebot and qBittorrent. The current setup that i have is as follows:
Qbit is downloading all torrents to a folder on a NAS called Z:/Downloads (obviously local drive)

Airvideo HD Server is running using this Z:/Downloads location as a source of the video files. No other files besides TV Shows and Movies are being downloaded in this folder.
My question would be:
- What would be the script to run if I want the FileBot just to run through the new downloaded files and download subtitles for them, without renaming, copying, moving or any other action to be performed for those video files.
I've tried few times to set it up and I experienced the following issues
- Not always the subtitles are downloaded - Bulgarian and English - using this command - subtitles=en, bg
- It ran through the Download Location and reorganize my files - Create new folder structure for the Movies/TV Shows, Rename the actual video file
I would appreciate your support and I'm looking forward for your reply.
Regards,
Re: [GUIDE] Fully Automated Media Center with qBittorrent
* The amc script is about organizing your files. If you don't want to organize your files you can't use the amc script
* Subtitles are not always available (especially for uncommon languages like Bulgarian)
Please read: viewtopic.php?t=5#p8871
* Subtitles are not always available (especially for uncommon languages like Bulgarian)
Please read: viewtopic.php?t=5#p8871
Re: [GUIDE] Fully Automated Media Center with qBittorrent
Hi,
Thank you for the reply.
So I would not need the AMC script, the thing that I would need to set the Fetch subtitles as per the other thread. Could you please just confirm if the script would look like this, having in mind my Home Setup?
filebot -script fn:suball Z:/Downloads --lang en,bg -non-strict --def maxAgeDays=3
And one more thing, do I add it still in the "Run external program on torrent completion" or I would need to set it as a Scheduled Task or automated CMD script. I know that sometimes Bulgarian subtitles might not be available, that's why i would like to check for both languages - BG and EN.
Thank you for the reply.
So I would not need the AMC script, the thing that I would need to set the Fetch subtitles as per the other thread. Could you please just confirm if the script would look like this, having in mind my Home Setup?
filebot -script fn:suball Z:/Downloads --lang en,bg -non-strict --def maxAgeDays=3
And one more thing, do I add it still in the "Run external program on torrent completion" or I would need to set it as a Scheduled Task or automated CMD script. I know that sometimes Bulgarian subtitles might not be available, that's why i would like to check for both languages - BG and EN.
Re: [GUIDE] Fully Automated Media Center with qBittorrent
1. Open CMD
2. Run the command
3. Read at the output and see if it's doing what you want it to do
You'll probably wanna add --log-file suball.log just in case.
2. Run the command
3. Read at the output and see if it's doing what you want it to do
You'll probably wanna add --log-file suball.log just in case.
Re: [GUIDE] Fully Automated Media Center with qBittorrent
I've ran the following script using CMD as Administrator and CMD advised it is COMPLETED.
filebot -script fn:suball Z:\Downloads -non-strict --lang en,bg --def maxAgeDays=7 --log-file suball.log
However no subtitles were downloaded. The Logfile shows the following info:
Done ヾ(@⌒ー⌒@)ノ
Done ヾ(@⌒ー⌒@)ノ
Done ヾ(@⌒ー⌒@)ノ
Done ヾ(@⌒ー⌒@)ノ
Done ヾ(@⌒ー⌒@)ノ
I'm not sure where the issue is. I've also tried with filebot.launcher.exe but with this nothing happened even the log file was not filled with details.
filebot -script fn:suball Z:\Downloads -non-strict --lang en,bg --def maxAgeDays=7 --log-file suball.log
However no subtitles were downloaded. The Logfile shows the following info:
Done ヾ(@⌒ー⌒@)ノ
Done ヾ(@⌒ー⌒@)ノ
Done ヾ(@⌒ー⌒@)ノ
Done ヾ(@⌒ー⌒@)ノ
Done ヾ(@⌒ー⌒@)ノ
I'm not sure where the issue is. I've also tried with filebot.launcher.exe but with this nothing happened even the log file was not filled with details.