bdizzle000 Posted February 14, 2012 Report Share Posted February 14, 2012 An API for uTorrent that is consumable from .NET and PowerShell. The API is written in C# and leverages WCF. Confirmed to work as of uTorrent 3.1.2. Unlike other uTorrent APIs floating around, token authentication is implemented.Codeplex:http://utorrentapi.codeplex.com/Currrently, not all features are implemented, but everything that is there is pretty clean. Documentation available here:http://utorrentapi.codeplex.com/documentationFeel free to contribute, request features, etc.2012 Apr 12 ---------------------------------------------------------------------------------------------------------------Updated to version 1.0.0.2. New features: - Ability to see file structure within torrents (implemented as Torrent.Files) - Ability to add local torrent files (implemented as Torrents.AddFile)Be sure to check out the documentation and sample scripts Link to comment Share on other sites More sharing options...
bdizzle000 Posted February 14, 2012 Author Report Share Posted February 14, 2012 POWERSHELLExample Usage:# --------------------------------------------------------------------------------------------------------# uTorrentHandler.ps1# ```````````````````# Features:# + Handle different torrents according to labels in uTorrent# + Use theRenamer to handle TV episodes and Movies downloaded through uTorrent# + Remove certain finished torrents from uTorrent# --------------------------------------------------------------------------------------------------------# #################################################### Setup# `````# Paste this command in uTorrent's "Run Program" Dialog Box:# powershell.exe -ExecutionPolicy RemoteSigned -WindowStyle Hidden -File 'Script Location' -hash '%I'## #################################################### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# Configuration# `````````````# Command Line Parameters param ($hash)# Location of ShowAnalyzer.exe $theRenamerEXE = "C:\Program Files (x86)\theRenamer\theRenamer.exe"# Video Extensions $VideoExt = "*.mp4", "*.avi", "*.mpg", "*.mkv", "*.iso", "*.m4v"# Movie Directory $MovieDir = "D:\Movies"# Download Directory $DownloadDir = "C:\Users\Home Theater PC\Downloads"# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Get-Date -Format "MM-dd-yyyy HH:mm") + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"$utorrentdll = Join-Path (Split-Path $MyInvocation.MyCommand.Path) 'UTorrentAPI.dll'[Reflection.Assembly]::LoadFile($utorrentdll) | Out-Null$utorrentclient = New-Object -TypeName UTorrentAPI.UTorrentClient -ArgumentList "http://127.0.0.1:8080/gui","admin","p@ssw0rd"# Create Hash Array$colHash = @()if ($hash) { $colHash += $hash}else { exit}foreach ($hash in $colHash) { $label = $utorrentclient.Torrents[$hash].Label $dir = (Join-Path $DownloadDir $label) -replace "(\[|\])","*" switch -wildcard ($label) { "TV*" { $utorrentclient.Torrents.Remove($hash) . $theRenamerEXE -fetch break } "Movie*" { $utorrentclient.Torrents.Remove($hash) . $theRenamerEXE -fetchmovie break } "*Wii*" { break } "*GameCube*" { break } default { exit } }} Link to comment Share on other sites More sharing options...
Resems Posted April 11, 2012 Report Share Posted April 11, 2012 the wrapper i was searching for !finally i can build my own auto labeler !ty and keep up the good work ! Link to comment Share on other sites More sharing options...
VPred Posted September 21, 2012 Report Share Posted September 21, 2012 Nice work! Just used it for a C# .Net Console application.Works great and is easy to use! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.