utorrent_email.jpg

Project Description
uTorrentRemote makes it easier for uTorrent user to control this application remotely. You'll no longer have to start downloading torrents from your home. Just send a link to your mailbox and uTorrent will automatically download it.

Current version supports only one torrent website, you can easily add your own.

How to use

Configure and start the application. Send one or several links to your mailbox with subject "utorrent". Application will automatically download correspondent .torrent files to specified directory and mark these email messages as seen. Torrent client must be configured to automatically start downloading files from this directory. That's it!

Configuration

Make sure you've set parameters in App.config file:
imap_email - your email
imap_password - password
imap_server
imap_port
imap_use_ssl

rutracker_login,
rutracker_password - options for RuTrackerDownloadDispatcher

store_directory - directory where your .torrent files will be stored. If directory doesn't exist, it will be automatically created. You can specify absolute or relative path. Make sure you specify this directory in your uTorrent client:

uTorrent_directory_config.jpg

Program design

The idea is simple.

Everything is about tokens.

Token is a simple string, usually line of text (without CRLF). Usually tokens looks like link to something.
For example "http://blabla-my-torrents-website.org/forum/viewtopic.php?t=3479204" can be a token. In the application you can
find two entities:
  • TokenSource
  • TokenDispatcher

TokenSource is the entity that gives us various tokens from elsewhere. TokenDispatcher is the entity that
dispatches the token and handles the result (torrent file) to uTorrent application. There are really no any rules which
sources and dispatchers you can use. It depends only on your imagination. By default there are two implementations
for each entity:

ImapTokenSource -- takes various tokens from mailbox.
SingleFileTokenSource -- takes various tokens from single file.

RuTrackerDownloadDispatcher -- downloads torrent file from rutracker.org
WriteToLogTokenDispatcher -- writes tokens to log (console).

You can create your own sources and dispatchers. For example, you can make IRC or Jabber token sources. And
you can make dispatchers for your favourite torrent websites.

The simplest application looks like:

static void Main(string[] args)
{
    ILog log = new ConsoleLog();
    ITokenSource source = new SingleFileTokenSource("aa.txt", log);
    ITokenDispatcher dispatcher = new WriteToLogTokenDispatcher(log);

    while (source.IsNextTokenAvailable())
    {
        Token token = source.FetchNextToken();
        dispatcher.TryToken(token);
    }
}


Dependencies

Depends on LumiSoft library (LumiSoft.Net.dll) which can be downloaded from http://www.lumisoft.ee/lsWWW/Download/Downloads/Net/

Last edited Mar 31, 2011 at 8:51 AM by Gangsta, version 16