public TorrentManager(string magnetUrl, string downloadLocation)
        {
            var settings = new EngineSettings
            {
                SavePath   = downloadLocation,
                ListenPort = Port
            };

            var torrentDefaults = new TorrentSettings();
            var writer          = new DiskWriter();

            _dataAccessor = new MonotorrentDataAccessor(writer);
            _engine       = new ClientEngine(settings, writer);

            if (!Directory.Exists(downloadLocation))
            {
                Directory.CreateDirectory(downloadLocation);
            }

            var magnet = MagnetLink.Parse(magnetUrl);

            _manager              = new MonoTorrent.Client.TorrentManager(magnet, downloadLocation, torrentDefaults, downloadLocation);
            _manager.PieceHashed += async(sender, eventArgs) => await _matroskaPlayer.OnPieceHashed(sender, eventArgs);

            _manager.TorrentStateChanged += delegate(object sender, TorrentStateChangedEventArgs args) { Console.WriteLine(args.NewState); };
            _matroskaPlayer = new MatroskaPlayer(_manager, _dataAccessor);
            TorrentError   += OnError;
        }
 public MatroskaPlayer(MonoTorrent.Client.TorrentManager manager, MonotorrentDataAccessor dataAccessor)
 {
     _manager      = manager;
     _dataAccessor = dataAccessor;
 }