v2.0.0-alpha.unstable.rev0147
Pre-releaseGeneral
-
Some minor renaming of settings in
EngineSettings
andEngineSettingsBuilder
. The old setting still exist but have been marked as[Obsolete]
and will be removed in a future pre-release. -
EngineSettings.CreateContainingDirectory
has been added. This setting only affects multi-file torrents. If a multi file torrent is being downloaded and this setting is enabled, a containing directory will automatically be created. If this is set to false, then no containing directly will be created for the files. -
If a
MagnetLink
is used to download a torrent you can now useTorrentManager.WaitForMetadataAsync ()
to wait for the metadata to be available. Metadata downloaded in this way may be automatically persisted in theEngineSettings.MetadataCacheDirectory
so it can be reloaded immediately if the MagnetLink is used a second time. -
There has been a fairly large change in how torrents are added to the engine, or are registered for streaming. The old API required you to create a
TorrentManager
manually and then register it with aClientEngine
before it could be used. This API has been simplified into:
var engine = new ClientEngine ();
// Download a torrent normally. `TorrentManager.StreamProvider` will be null
// and you will not be able to stream files as they download
TorrentManager downloader = await engine.AddAsync (...);
// Download a torrent in so that individual files can be streamed as they download
// `TorrentManager.StreamProvider` will be non-null and you will be able to stream
// files as they download using `TorrentManager.StreamProvider.CreateStreamAsync`.
TorrentManager streaming = await engine.AddStreamingAsync (...);
```
NOTE: If you download a torrent using a `MagnetLink` the engine will check for, and load, a cached version of the metadata if one is discovered in the cache directory.
* The engine will now automatically save/restore `FastResume` data for individual torrents
and will also save/restore a cache of the DHT table reduce the time it takes to bootstrap
DHT. These behaviours are on by default, but can be disabled using the settings in `EngineSettings`.