NzbDrone/NzbDrone — pull request #76 by Taloth (2014-04-26 00:16:45+00:00)
Title: Collaboration on Torrent support and Download Client driven Import

For comments only. Practically all the work on Torrent support was done by @mythjuha.
Probably will have to rebase and squash specific features into individual PRs later.

The Download tracking works as follows:
* The DownloadTrackingService is the entry point for checking for completed/failed downloads.
* It will create a in-memory cache item for each queue/history item from all download clients.
* It will attempt to determine the actual state of the download by using the grabbed/failed/imported history known to drone.
* It will then delegate the logic to the FailedDownloadService & CompletedDownloadService.
* The FailedDownloadService will store it's retry count in the same cached item.
* The CompletedDownloadService will attempt to Import completed downloads and associating the known downloadclientid with the import.
* If the DownloadClient reported a HistoryItem as IsReadOnly, the CompletedDownloadService will copy files instead of moving them, this is to facilitate seeding.
Currently the CompletedDownloadService only supports folders (via the HistoryItem Storage property) and not individual files.

Currently the Drone Factory still exists, but it might be replaced with the WatchFolder Download Client in the future. But currently the Drone Factory is the only one capable of importing files without a parent folder.

A few things I believe are remaining:
* Tests for the Torrent Download Clients.
* Support for importing Downloads which were not initially grabbed by drone.
* Filtering in the Download Client on category.
* Torrent Download Client has to set the IsReadOnly flag
* Download Clients must provide unique Id for each historyitem (particularly important for Blackhole)
* Various fixes.
* Update UI to clearly distinguish between the Usenet and Torrent Download Client/Indexers when adding.
* Change UI to move Indexer settings to Modal dialogs, keeping the main panel limited in size.
* Adding UI to add indexers from list, thus being able to delete and add built-in indexers.
* (probably more)