问题标签 [libtorrent]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
454 浏览

casting - 使用 Golang 绑定在 libtorrent 中投射“警报”类型

我正在使用libtorrent-go在 Golang 中开发个人项目

当我收到 type 的警报时"save_resume_data_alert",我将其拾取并必须按照libtorrent 文档中的说明进行 CAST

但我真的不知道如何在 golang 中投射它!当前代码:

0 投票
1 回答
906 浏览

python - Select which part of file to download

I'm trying to develop my own torrent app using Python. After some research I decided to go with libtorrent, and found this interesting answer:

I've found also another similar question with one answer:

but there I couldn't understand how to do it, I read the full documentation they link in the question and didn't get any idea about how to face this.

I've been looking around libtorrent trying to understand how could I manage the download...

  • How could I to start downloading from the beginning to the end ?

My goal is to start the download the torrent "ordered", meaning I don't want to download random parts of the torrent, the ones availables at the moment, I would like to download it from the beginning to the end.

If anybody has try this and could point me to the right libtorrent documentation would be awesome !!!


  • How could I start to download the file ordered ? --> set_sequential_download()

But how could I wait for the pieces ? How do I configure libtorrent to wait for the first 10 pieces until begin with the next 10 ?

0 投票
2 回答
144 浏览

spring - 建立洪流提供者网站

最近我收到了一个类似 torrentz.eu、thepiratebay 等的 torrent 提供商项目,任何人都可以在其中搜索他们想要下载的内容,然后在 torrent 的帮助下获得下载。

我不知道这背后的概念,基本要求是什么,完成它的过程是什么。我已经通过谷歌搜索,但没有找到与我的问题相关的任何相关答案。

我只想知道这个过程以及我真正需要做什么才能完成它。我将使用的技术是spring框架。

谢谢

0 投票
1 回答
1199 浏览

python - libtorrent 如何获取文件种子内容的列表?

关于这个 torrent_info 类文档: http: //libtorrent.org/reference-Core.html#torrent_info

因为我不懂C++,所以获取到种子文件列表。使用Python

0 投票
1 回答
3874 浏览

python - 创建新的种子和种子

我正在使用以下代码创建一个新的 torret 并共享,但由于从未播种,因此出现了问题。

按顺序测试:

  • 我运行脚本
  • mytorrent.torrent 已正确创建
  • 打印“总大小:”并打印“名称:”就可以了
  • 按顺序循环打印:

100.00% 完成(向下:0.0 kb/s 向上:0.0 kB/s 对等点:0)播种(8 次)

100.00% 完成(向下:0.0 kb/s 向上:0.0 kB/s 对等点:1)播种(11 次)(即使不运行 torrent 客户端,这种情况总是会发生。)

100.00% 完成(向下:0.0 kb/s 向上:0.0 kB/s 对等点:0)播种(无限次)

  • 我用 torrent 客户端运行 torrent 文件,但没有任何反应。

在此处输入图像描述

  • 除了尝试使用上述商业软件下载 torrent 外,我还尝试使用 libtorrent 库下载。始终显示 0 个对等点。

测试结果相同的变化:

  • 我尝试使用不同的跟踪器:

    /li>
  • 我在执行脚本后立即在客户端运行了 torrent 文件,之后也运行了。

  • lt.torrent_info('mytorrent.torrent') 替换为 lt.torrent_info(torrent)

附加信息:

  • 为了进行测试,我使用了两台 Windows 计算机,每台计算机都连接到不同的网络。在每个网络中,所需的端口都是开放的。
  • 运行每个测试的时间至少为 1:20 小时。

其他测试:

  • 在我曾经共享的计算机中,我尝试共享别人创建的种子。我已经运行了标有“#Seed torrent”的代码,它起作用了:

    100.00% 完成(下行:2.0 kb/s 上行:45.0 kB/s 对等点:13)播种

  • 在我用来下载 torrent 的计算机中,我下载了一个已经由其他人创建的 torrent(带有 libtorrent),并且它工作正常。

因此我只能认为“#create torrent”这段代码有问题。好像跟踪器不会保存信息集。

0 投票
1 回答
692 浏览

python - libtorrent python dht 示例

我正在尝试实现一个 p2p 应用程序。我想在 libtorrent 库中使用 DHT。我想将 python 用于 p2p 应用程序。谁能建议一个示例 dht libtorrent python 实现或我可以使用的一些 api?

0 投票
1 回答
1366 浏览

bittorrent - 如何获取 bitorrent 跟踪器 url 列表

我在一个文本文件中遇到了大约 100 个 bitorrent 跟踪器的列表。我的问题是他们如何能够生成具有如此多跟踪器的文本文件。任何人都有生成此跟踪器 url 的脚本?bittorent 跟踪器的示例是:http://3dfreedom.ru:6969/ announce

0 投票
2 回答
294 浏览

python - Libtorrent 如何设置超时?

我用add_magnet_uri获取信息,但是有些资源响应慢,应该用什么来设置总超时?

http://www.rasterbar.com/products/libtorrent/manual.html

:( 没找到相关设置

0 投票
1 回答
683 浏览

python - python libtorrent save_state

我有个问题。我不是 C/C++ 程序员,libtorrent 文档对我来说并不是很清楚。没有像 libtorrent 的 python 文档那样可以找到的文档。

此刻,我尝试在 stackoverflow 中搜索代码示例,以了解如何将 save_state 和 load_state 用于会话。

谁能给我一个例子或解释我如何保存会话状态并稍后加载?

目标是在进程重新启动时恢复所有种子。

更新 当在 torrent 句柄上使用 save_state_resume() 时它也没有返回?我发现执行“pydoc libtorrent > libtorrentDoc.txt”给了我一个有用的文档来浏览和搜索。此时我将磁铁重新添加到会话中并使用上面的代码。

也许有人有更有效的方法?

0 投票
1 回答
631 浏览

python - 检查从 torrent 下载的视频文件是否可以播放

我对python很陌生。我编写了一个程序,它使用 libtorrent 通过 torrent 下载视频文件。我已将其设置为顺序下载,因此所有部分都以正确的顺序下载,以便在下载视频时观看该视频。我得到的问题是该文件在下载开始后无法立即播放。有时应该下载 10mb,有时 30mb 才能开始视频查看。我的想法是,这是因为缺少一些元数据。我的问题是关于检查文件是否可以播放的方法。关于实现这一目标的任何建议?我已经搜索了很多,但还没有找到任何东西。我正在使用 python 2.7(2.7 因为它与 libtorrent 兼容)、libtorrent、kivy 框架 1.8 和内置视频播放器,据我所知,它使用 gstreamer。https://github.com/dpitkevics/stream-ies?files=1 重要文件是 main.py, lib/downloader.py 提前谢谢你们:)