Page 5 of 6

Re: Need setup help to auto-extract torrent files

Posted: Tue Jun 14, 2016 12:05 am
by znoopy
Really nice work, i hade to put in a 'TIMEOUT /T 10' command to get it to work for me but still working
real nice. I have one question if anyone know how to use the label trigger in a script ?

for torrents that are has the label Movies i want to execute
if exist "D:\TorrentDownload\%~nx1\*.r*" ("C:\Program Files\WinRAR\WinRAR.exe" x -ibck -inul "D:\TorrentDownload\%~nx1\*.r*" "D:\Media\Movies\%~nx1\")

and for torrents that are has the label TV i want  to execute
if exist "D:\TorrentDownload\%~nx1\*.r*" ("C:\Program Files\WinRAR\WinRAR.exe" x -ibck -inul "D:\TorrentDownload\%~nx1\*.r*" "D:\Media\TV\%~nx1\")

But still im really happy that you all fixed the script and i could just tweek it for my own use but with a label tweek i think i would be awesome for some people

/z

Re: Need setup help to auto-extract torrent files

Posted: Tue Jun 14, 2016 2:56 am
by tekko
Try something like:

cmd.exe /c "I:\qBittorrent\script.bat" "%F" "%L"
if exist "D:\TorrentDownload\%~nx1\*.r*" ("C:\Program Files\WinRAR\WinRAR.exe" x -ibck -inul "D:\TorrentDownload\%~nx1\*.r*" "D:\Media\%~2\%~nx1\")

Untested. Again, if u want help from me, u need to tell me what u see. If u don't, u'll need to wait for someone else.

Re: Need setup help to auto-extract torrent files

Posted: Wed Jun 15, 2016 2:05 am
by znoopy
That worked :) i tested around some with this code

if %~2==media goto media
if not %~2==games goto others

:media
if exist "D:\TorrentDownload\%~nx1\*.r*" ("C:\Program Files\WinRAR\WinRAR.exe" x -ibck -inul "D:\TorrentDownload\%~nx1\*.r*" "D:\TorrentDownload\_Dronedir\")
if exist "D:\TorrentDownload\%~nx1\%~nx1.mkv" (copy /v "D:\TorrentDownload\%~nx1\%~nx1.mkv" "D:\TorrentDownload\_Dronedir\")
if exist "D:\TorrentDownload\%~nx1\%~nx1.mp4" (copy /v "D:\TorrentDownload\%~nx1\%~nx1.mp4" "D:\TorrentDownload\_Dronedir\")
if exist "D:\TorrentDownload\%~n1.mkv" (copy /v "D:\TorrentDownload\%~n1.mkv" "D:\TorrentDownload\_Dronedir\")
if exist "D:\TorrentDownload\%~n1.mp4" (copy /v "D:\TorrentDownload\%~n1.mp4" "D:\TorrentDownload\_Dronedir\")

:others
if exist "D:\TorrentDownload\%~nx1\*.r*" ("C:\Program Files\WinRAR\WinRAR.exe" x -ibck -inul "D:\TorrentDownload\%~nx1\*.r*" "D:\Test\%~2\%~nx1\")

it worked just fine if it was labels on it but did the torrent miss a label it didnt worked, maybe you have any dos code idees ?

Re: Need setup help to auto-extract torrent files

Posted: Wed Jun 15, 2016 2:22 am
by tekko
if "%~2" equ "" (do whatever)
tests for empty labels.

Re: Need setup help to auto-extract torrent files

Posted: Wed Jun 15, 2016 3:00 am
by znoopy
tested if %~2 equ "" goto others and no luck, this no label really sucks lol

hmmm wonder if i can force qbittorrent to set a label on torrents that miss labels

Re: Need setup help to auto-extract torrent files

Posted: Wed Jun 15, 2016 3:27 am
by tekko
[quote="znoopy"]
tested if %~2 equ "" goto others and no luck, this no label really sucks lol

hmmm wonder if i can force qbittorrent to set a label on torrents that miss labels
[/quote]

Don't take out the quotes.

Actually, why did u modify the code like that? It doesn't seem right.


if /i "%~2" equ "media" goto media
if /i "%~2" equ "games" exit
if exist "D:\TorrentDownload\%~nx1\*.r*" ("C:\Program Files\WinRAR\WinRAR.exe" x -ibck -inul "D:\TorrentDownload\%~nx1\*.r*" "D:\Test\%~2\%~nx1")
exit
:media
if exist "D:\TorrentDownload\%~nx1\*.r*" ("C:\Program Files\WinRAR\WinRAR.exe" x -ibck -inul "D:\TorrentDownload\%~nx1\*.r*" "D:\TorrentDownload\_Dronedir") &exit
if exist "D:\TorrentDownload\%~nx1\%~nx1.mkv" (copy /v "D:\TorrentDownload\%~nx1\%~nx1.mkv" "D:\TorrentDownload\_Dronedir") &exit
if exist "D:\TorrentDownload\%~nx1\%~nx1.mp4" (copy /v "D:\TorrentDownload\%~nx1\%~nx1.mp4" "D:\TorrentDownload\_Dronedir") &exit
if exist "D:\TorrentDownload\%~n1.mkv" (copy /v "D:\TorrentDownload\%~n1.mkv" "D:\TorrentDownload\_Dronedir") &exit
if exist "D:\TorrentDownload\%~n1.mp4" (copy /v "D:\TorrentDownload\%~n1.mp4" "D:\TorrentDownload\_Dronedir")

Re: Need setup help to auto-extract torrent files

Posted: Thu Jun 16, 2016 1:28 am
by znoopy
Worked perfect! Thanks!  :D

Re: Need setup help to auto-extract torrent files

Posted: Tue Jun 21, 2016 10:26 am
by znoopy
After i updated qbittorrent with latest update the run external program function with
cmd.exe /c "D:\script.bat" "%F" "%L"
doesnt work, have they changed something ?

Re: Need setup help to auto-extract torrent files

Posted: Tue Jun 21, 2016 10:53 am
by tekko
[quote="znoopy"]
After i updated qbittorrent with latest update the run external program function with
cmd.exe /c "D:\script.bat" "%F" "%L"
doesnt work, have they changed something ?
[/quote]

Yes, whatever that is... https://github.com/qbittorrent/qBittorr ... c3d843eb0b
try removing cmd.exe /c

Re: Need setup help to auto-extract torrent files

Posted: Tue Jun 21, 2016 11:51 am
by znoopy
Doesnt work that either, can start notepad.exe but cant start cmd.exe

Re: Need setup help to auto-extract torrent files

Posted: Wed Jun 22, 2016 6:37 pm
by KitKat
Try these
"cmd.exe /c D:\Script.bat %F %L"

cmd.exe /c D:\Script.bat "%F" "%L"

cmd.exe /c "D:\Script.bat %F %L"

If im mistaking the issue as it fails to open cmd.exe completely theres always the above listed option of actually compiling the batch script then calling it directly.

Re: Need setup help to auto-extract torrent files

Posted: Wed Jun 22, 2016 8:43 pm
by tekko
The new code seems to add "cmd.exe /c" to the front, so I said to try without it.
But it doesn't seem to work, as tested by znoopy, I haven't tested it myself though.

Re: Need setup help to auto-extract torrent files

Posted: Fri Jun 24, 2016 5:41 pm
by KitKat
[quote="tekko"]
The new code seems to add "cmd.exe /c" to the front, so I said to try without it.
But it doesn't seem to work, as tested by znoopy, I haven't tested it myself though.
[/quote]
Oh it does too.
You should be able to just call batch files directly now

eg cmd.exe /c "D:\script.bat" "%F" "%L"
becomes
D:\script.bat "%F" "%L"

Re: Need setup help to auto-extract torrent files

Posted: Sun Jun 26, 2016 8:52 am
by Galana
[quote="KitKat"]
Oh it does too.
You should be able to just call batch files directly now
[/quote]

Should, but doesn't.  Worked less than a month.  Me sad now.  :'(

I'll use the EXE "compiler" to see if that's a workaround...

*** And it appears that it is.  The Pause function doesn't work, so I can't evaluate the step-by-step...  I lied, the RAR worked, but the MKV didn't fully (it didn't to the copy to TV, but it did move to Completed and get picked up by the NAS)...  Evaluating further...  Well, it worked fine on a different MKV, so I don't know.  And another key flaw is that it appears that a version of the script gets trapped in the Task Manager...  That could really add up over time with recurrences.

I would like to go back to 3.3.4, but it appears that it's been stripped off the website (which is really not a good thing to do!)

But it can be found by manually editing the current-version installation link:
http://sourceforge.net/projects/qbittor ... e/download
to
http://sourceforge.net/projects/qbittor ... e/download

Just remember to go into Tools -> Options -> Advanced and turn off Update notifications.

Re: Need setup help to auto-extract torrent files

Posted: Sat Jul 16, 2016 12:02 pm
by tekko
In 3.3.5, try the following:

"D:\script.bat "%F" "%L""