且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MonoTorrent - 磁铁链接.torrent文件

更新时间:2023-12-03 20:53:34

是的,它可以使用monotorrent库来完成。

yes, It could be done using the monotorrent library.

您可以采取的磁铁链接的散列值,并用它来创建一个任务管理器,在下载之前将创建一个种子文件。

you could take the hash value from the magnet link and use it to create a torrent manager that will create a torrent file before downloading.

如果是这样的磁铁链接:

if this were the magnet link:

磁铁:XT =瓮:btih:18981bc9759950b4715ad46adcaf514e6a773cfe

magnet:?xt=urn:btih:18981bc9759950b4715ad46adcaf514e6a773cfe

hash=18981bc9759950b4715ad46adcaf514e6a773cfe;
manager = new TorrentManager(InfoHash.FromHex(hash), downloadsPath, torrentDefaults,     downloadsPathForTorrent);

这应该下载torrent文件为downloadsPathForTorrent',你可以尽快停止下载,因为它开始。

this should download a torrent file to 'downloadsPathForTorrent', and you can stop the download as soon as it begins.

希望这有助于。

有关如何实现此结账的monotorrent文档的详细信息:

for more information on how to implement this checkout the monotorrent documentation:

http://www.mono-project.com/MonoTorrent