Skip to content

v1.0.18

Compare
Choose a tag to compare
@alanmcgovern alanmcgovern released this 16 Mar 16:54
· 993 commits to master since this release

New Features

Added MonoTorrent.Streaming.StreamProvider. This class allows files in a torrent to be accessed using a readable and seekable Stream while the Torrent is still being downloaded. The Stream instance returned by StreamProvider.CreateStreamAsync uses a special PiecePicker so that it downloads data sequentially starting at the current Stream.Position. In other words - if you are streaming a video file you can seek to the middle of the file and MonoTorrent will immediately start downloading pieces from that point onwards.

An example usage is:

var engine = new ClientEngine ();
var provider = new StreamProvider (engine, downloadsPath, Torrent.Load (@"path\to\media.torrent"));
await provider.StartAsync ();
var httpStream = await provider.CreateHttpStreamAsync (provider.Manager.Torrent.Files[0]);
Process.Start (@"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe", httpStream.Uri.ToString ());

Bug fixes

  • Fixed an issue where calling TorrentManager.StopAsync could result in a NullReference being thrown. This should not result in any user visible issues, but could result in a Task with an unobserved Exception.