Jump to content

uTorrent Inconsistent When Passing Parameters for Postprocessing


Big_Chubbz

Recommended Posts

I am running v 3.3.2 build 30303 [32 bit]

Windows 7 HP 64bit

I am running the following bat file borrowed and tweaked from Axman:

@echo off
title Duplicating a Freshly Downloaded Movie or Show
rem Parameter usage: fromdir torrent-name label kind [filename]
rem corresponds to uTorrents flags: %D %N %L %K %F
echo *********************************************
echo Run on %date% at %time%

set fromdir=%1
set name=%2
set label=%3
set kind=%4
set filename=%5
set savepartition=J:
set moviedir=%savepartition%\"Movies [NOSYNC]"
set showdir=%savepartition%\"TV [NOSYNC]"

rem Only process PTP or BTN Auto torrents
if %label%=="PTP" goto movie
if %label%=="BTN Auto" goto show

GOTO :EOF

:movie
echo ***Movie**********
set todir=%moviedir%
set type="New Movie"
if %kind%=="single" goto single
goto multi

:show
echo ***Show**********
set todir=%showdir%
set type="New TV Show"
if %kind%=="single" goto single
goto multi

:single
echo Single
echo %fromdir%%filename% %todir% /I
xcopy %fromdir%%filename% %todir% /I
goto growler

:multi
echo Multi
echo %fromdir% %todir%\%name% /I
xcopy %fromdir% %todir%\%name% /I
goto growler

:growler
call "C:\Program Files (x86)\Growl for Windows\growlnotify.exe" /a:"uTorrent" /n:"Finished" /t:%type% %name%
echo Processing Complete on %date% at %time%

I have it set to run when a torrent finishes with the following command under Preferences -> Advanced -> Run Program:

C:\scripts\torrentscript.bat "%D" "%N" "%L" "%K" "%F" >> C:\scripts\torrentlog.txt

All my torrents are being saved either under J:\Movies or J:\TV. When they complete, the file above copies the files into either J:\Movies [NOSYNC] or J:\TV [NOSYNC] as appropriate. It works great sometimes and fails other times. I have been up all night trying to determine the issue, and I think I have found it.

Sometimes uTorrent passes the path to the bat file as "J:\Movies\" but other times it passes it as "J:\Movies".

Can a dev take a look to see what's up? Or can anyone think of a good workaround? I was using a troubleshooting bat file and echoing %fromdir% to check, and it varied between the two formats. I am pulling my hair out. Please help!

Chubbz

Link to comment
Share on other sites

Sometimes uTorrent passes the path to the bat file as "J:\Movies\" but other times it passes it as "J:\Movies".

Have you checked how the path is defined when the jobs are running?

Are the jobs being loaded from the same source? ie: RSS feeds where the paths are defined differently?

This is more likely to be a error in setting something up, rather than uTorrent arbitrarily 'deciding' to "shake things up".

Link to comment
Share on other sites

This is more likely to be a error in setting something up, rather than uTorrent arbitrarily 'deciding' to "shake things up".

I agree, but, I just couldn't figure out where uTorrent was pulling the path from. UNTIL NOW! I think I figured it out. In the RSS Downloader, it pulls the path from the "Save in" field. When adding a torrent manually, it again seems to pull from the "Save in" field. Automatic downloads are tagged with the path indicated in Preferences -> Directories -> "Put new downloads in". I went through and put the \ into both static places and will have to remember to include it when doing manual downloads. So far, testing is going well. No fails yet after applying that fix. I guess typing out the problem helped to make the light bulb go off. Now to sleep until noon or so. Thanks for your reply!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...