Open torrent file in uTorrent with C#
I am creating a windows service in C# .net. In the service i have a FileSystemWatcher that checks a directory (which is in my dropbox) for the create event for files. No problems so far. The idea is that I watch for the creation of torrent files. Then when a torrent file is created in that directory, I want to add it to uTorrent and start the download.
The windows service, file system w开发者_C百科atcher, no problem at all. My only question is: how to add the torrent to uTorrent (or an other torrent client), or, how to download the torrent in C#?
I hope I made my self clear :-)
To start default BitTorrent client:
using System.Diagnostics;
using System.IO;
string dirWithTorrent = @"c:\Downloads";
Process.Start(Path.Combine(dirWithTorrent, "example.torrent"));
There are a number of 'wrapper' libraries for the uTorrent JSON API which you can manipulate uTorrent with!
I do not know what functionality other clients offer as far as remote control goes. Command line, undoubtedly.
精彩评论