Jump to content

mrMan01

Established Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by mrMan01

  1. When using the run command on completion, I think the command runs before utorrent has finished moving the files to the completed directory.

    I have a script that I'm executing via on completion. The script copies the DL'ed files to a new location for processing. Some of the files that are copied end up with a file size of zero. I have added some extra logging so I can get some more details but I was curious if anyone could confirm this?

    I'm running 3.0 but assume its the same in 2.2 and is more a 2.2 feature than 3.0.

    thoughts?

  2. @mrMan01: As I understand it, µTorrent 3.0 requires HTTP cookies to be sent now.

    Thanks Utima that was the problem,

    I changed my script to this (which gets the list of active torrents back).

    Code is powershell

    $port = "80"
    $server = "server"
    $user = "Guest123aHjp87dw"
    $pass = $null

    $utorrentUrl = "http://$server`:$port/gui/"

    $webClient = new-object System.Net.WebClient
    $webClient.Headers.Add("user-agent", "PowerShell Script")
    $webClient.Credentials = new-object System.Net.NetworkCredential($user, $pass)

    $result = $webClient.DownloadString($utorrentUrl + "token.html")
    [string]$cookies = $webClient.ResponseHeaders["Set-Cookie"]

    if ($result -match ".*<div[^>]*id=[`"`']token[`"`'][^>]*>([^<]*)</div>.*")
    {
    $token = $matches[1]
    $webClient.Headers.Add("Cookie", $cookies)
    $result = $webClient.DownloadString($utorrentUrl + "?list=1&token=" + $token)
    }

  3. I'm having a problem with the current beta. For some reason, my upload bandwidth is capped at about 20-25 kB/s although I have set it to "unlimited" in the settings and I usually should get an upload speed around 40-50 kB/s.

    Setting the upload speed cap to somewhere below 20 kB/s works fine (+-1kB/s at least), but a higher ones doesn't work.

    In the past I have moved torrents from one bittorrent application to another on different PC's by opening a torrent that is already running on the first app/PC on the second app/PC. The two apps transfer data as fast as my internal network would handle. Might be a way if testing if utorrent is capping the speed some how.

  4. Are you using the right token?

    I believe so, having compared what was returned to what I passed in. Also the script works in 2.0.4 but not in 3.0.

    powershell script

    $port = "80"
    $server = "server"
    $user = "Guest123aHjp87dw"
    $pass = $null

    $utorrentUrl = "http://$server`:$port/gui/"

    $webClient = new-object System.Net.WebClient
    $webClient.Headers.Add("user-agent", "PowerShell Script")
    $webClient.Credentials = new-object System.Net.NetworkCredential($user, $pass)

    $result = $webClient.DownloadString($utorrentUrl + "token.html")
    "Returned Token"
    $result

    if ($result -match ".*<div[^>]*id=[`"`']token[`"`'][^>]*>([^<]*)</div>.*")
    {
    $token = $matches[1]
    "url to call | " + $utorrentUrl + "?list=1&token=" + $token
    $result = $webClient.DownloadString($utorrentUrl + "?list=1&token=" + $token)
    }

    Resuts for 2.0.4

    <html><div id='token' style='display:none;'>BsIIjTXsKtfWjJqKj9hcJ2q4cRrTYUEQNZ9fMhVbibFPerLwm1YDB5RP0Uw=</div></html>
    url to call
    http://server:80/gui/?list=1&token=BsIIjTXsKtfWjJqKj9hcJ2q4cRrTYUEQNZ9fMhVbibFPerLwm1YDB5RP0Uw=

    Results for 3.0

    <html><div id='token' style='display:none;'>zmdlsuY61jEcDoNyZxBgxFZCdeFOtl_TLRREbmviftV026wIeSozv1dR0Uw=</div></html>
    url to call
    http://server:80/gui/?list=1&token=zmdlsuY61jEcDoNyZxBgxFZCdeFOtl_TLRREbmviftV026wIeSozv1dR0Uw=
    Exception calling "DownloadString" with "1" argument(s): "The remote server returned an error: (400) Bad Request."

  5. I am using version (3.9.22787) and from this version, if I change the upload limit to 20kb it bypass and go to 50kb +, I have try everything , but I can not keep the upload limit to 20kb. My download is always 25kb.

    I tested this on the same version and had no problems.

    I had one torrent running and tried setting via status bar (bottom of window) and right clicking on the torrent and selecting bandwidth allocation. Both methods worked as expected (upload went from about 70kb to 20kb).

  6. This build seems to crash for me when i add new torrent files, especially via the watched directory option.

    Same here, It adds the torrent to the list then crashes.

    I'm running the utorrent client as a service under a 'service account' with restricted access. Is it possible to configure the logging so that it always logs to a file?

    I have been testing the run command after state change or torrent finished, is working really well. After it has finished I want to copy the files, It's a little tricky to find the name of the file or folder with single file torrents being different to folder torrents. Currently I'm doing this, is there a better way?

    Code is powershell

    #%F - Name of downloaded file (for single file torrents)

    #%D - Directory where files are saved

    #%N - Title of torrent

    #if the name is equal to the file its prob single file

    if($N -eq $F)

    {

    #It's a single file torrent

    $Source = join-path -path $D -childpath $F

    }

    else

    {

    #It's a folder torrent

    $Source = $D

    $sourceObj = get-Item -LiteralPath $Source

    if ($sourceObj.name -ne $N)

    {

    Log_Message "ERROR| Folder name does not match %N: $($sourceObj.name)"

    $Source = $null

    }

    }

    Thanks

×
×
  • Create New...