utorrent script to qBittorrent script

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
karulio69
Posts: 5
Joined: 05 Mar 2014, 18:48

utorrent script to qBittorrent script

Post by karulio69 »

So far I've read the forums that describe that qBittorrent does not execute the same scripts as utorrent. I've been using utorrent for years and have just now switched over to qBittorrent. I have a script that splits a lot of different things into different folders based on genre etc.

uTorrent Script:

Code: Select all

filebot -script fn:amc  --log-file amc.log --action move --conflict override -non-strict --def music=n subtitles=en artwork=n clean=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" "seriesFormat=W:/Library/Video/{genres =~ /Kids|Family|Children/ ? 'Kids TV Shows' : 'TV Shows'}/{n}/{'Season '+s}/ {n} - {sxe} - {t}" "movieFormat=W:/Library/Video/{genres =~ /Kids|Family|Children/ ? 'Kids Movies' : 'Movies'}/{n} ({y})/ {n} ({y})"


I'm wondering if this is even possible to run purely in qBittorrent or if it would be easier to write this in a utorrent-postprocess.pyw python script.

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

Re: utorrent script to qBittorrent script

Post by rednoah »

filebot and the amc script work exactly the same, regardless of how it's called. The glue logic that calls filebot / amc with input files varies depending on the upstream application.


uT and qBT both use command templates and replacement patterns and then call the given command accordingly.


e.g. uT:

Code: Select all

"ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
e.g. qBT:

Code: Select all

"ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"

:idea: Everything else is the same. You can run the amc script from command-line manually if you're still trying to figure things out.
:idea: Please read the FAQ and How to Request Help.
karulio69
Posts: 5
Joined: 05 Mar 2014, 18:48

Re: utorrent script to qBittorrent script

Post by karulio69 »

After some trial and error, editing the commands to what you said for qBT vs Ut worked! unfortunately, now i cannot get the "cleaning" portion to delete the root folder and extra junk after moving the file. I have tried running this in shell and I do see that it defines "Parameter: clean = y" but nothing ever gets deleted. I checked the logs and nothing happens to the folder after the rename and move (which is working flawless now btw!!)

Code: Select all

Run script [fn:amc] at [Wed Nov 13 14:00:59 EST 2019]
Parameter: clean = y
Parameter: minsize = 0
Parameter: deleteAfterExtract = y
Parameter: music = n
Parameter: subtitles = en
Parameter: artwork = n
Parameter: ut_label = 
Parameter: ut_title = Joker.2019.1080p.KORSUB.HDRip.x264.AAC2.0-STUTTERSHIT
Parameter: ut_kind = %multi
Parameter: ut_dir = D:\System32\Joker.2019.1080p.KORSUB.HDRip.x264.AAC2.0-STUTTERSHIT
Parameter: seriesFormat = W:/Library/Video/{genres =~ /Kids|Family|Children/ ? 'Kids TV Shows' : 'TV Shows'}/{n}/{'Season '+s}/ {n} - {sxe} - {t}
Parameter: movieFormat = W:/Library/Video/{genres =~ /Kids|Family|Children/ ? 'Kids Movies' : 'Movies'}/{n} ({y})/ {n} ({y})
Input: D:\System32\Joker.2019.1080p.KORSUB.HDRip.x264.AAC2.0-STUTTERSHIT\Joker.2019.1080p.KORSUB.HDRip.x264.AAC2.0-STUTTERSHIT.mp4
Group: [mov:joker 2019] => [Joker.2019.1080p.KORSUB.HDRip.x264.AAC2.0-STUTTERSHIT.mp4]
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
Fetching [English] subtitles [Joker.2019.KORSUB.HDRip.x264-STUTTERSHIT.srt] from [OpenSubtitles]
Export [Joker.2019.KORSUB.HDRip.x264-STUTTERSHIT.srt] as [SubRip / UTF-8]
Writing [Joker.2019.KORSUB.HDRip.x264-STUTTERSHIT.srt] to [Joker.2019.1080p.KORSUB.HDRip.x264.AAC2.0-STUTTERSHIT.eng.srt]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [D:\System32\Joker.2019.1080p.KORSUB.HDRip.x264.AAC2.0-STUTTERSHIT\Joker.2019.1080p.KORSUB.HDRip.x264.AAC2.0-STUTTERSHIT.mp4]
[MOVE] From [D:\System32\Joker.2019.1080p.KORSUB.HDRip.x264.AAC2.0-STUTTERSHIT\Joker.2019.1080p.KORSUB.HDRip.x264.AAC2.0-STUTTERSHIT.mp4] to [W:\Library\Video\Movies\Joker (2019)\Joker (2019).mp4]
[MOVE] From [D:\System32\Joker.2019.1080p.KORSUB.HDRip.x264.AAC2.0-STUTTERSHIT\Joker.2019.1080p.KORSUB.HDRip.x264.AAC2.0-STUTTERSHIT.eng.srt] to [W:\Library\Video\Movies\Joker (2019)\Joker (2019).srt]
Processed 2 files
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: utorrent script to qBittorrent script

Post by rednoah »

YES:

Code: Select all

ut_kind = multi
NO:

Code: Select all

ut_kind = %multi
:idea: Please read the FAQ and How to Request Help.
karulio69
Posts: 5
Joined: 05 Mar 2014, 18:48

Re: utorrent script to qBittorrent script

Post by karulio69 »

rednoah wrote: 13 Nov 2019, 19:15 YES:

Code: Select all

ut_kind = multi
NO:

Code: Select all

ut_kind = %multi
Update: This was the problem, it worked. Thank you for noticing the small typo.
Post Reply