示例#1
0
        /// <summary>
        /// Notifies the torrent service to download
        /// a torrent.
        /// </summary>
        /// <param name="torrent">Torrent to download.</param>
        public async Task Download(Torrent torrent)
        {
            try {
                await _torrentClient.DownloadAsync(torrent.MagnetUri);

                _log.LogInformation($"Downloaded Torrent: {@torrent.Title}", torrent);
            }
            catch (Exception ex) {
                _log.LogError(ex, $"Failed to download {@torrent.Title} : {@torrent}", torrent);
                throw;
            }

            // Audit DL
        }