@@ -180,6 +180,26 @@ $ file ~/Downloads/sintel.mp4
180180
181181For more information, see the [info reference](# info).
182182
183+ # ### 4. Get Torrent Metrics with `htorrent metrics`
184+
185+ If you want to check metrics such as download progress or the amount of connected peers, you can use the metrics endpoint:
186+
187+ ` ` ` shell
188+ $ htorrent metrics
189+ - magnet: magnet:? xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10& dn=Sintel& tr=udp%3A%2F%2Fexplodie.org%3A6969& tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969& tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337& tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969& tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337& tr=wss%3A%2F%2Ftracker.btorrent.xyz& tr=wss%3A%2F%2Ftracker.fastcast.nz& tr=wss%3A%2F%2Ftracker.openwebtorrent.com& ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F
190+ peers: 2
191+ files:
192+ - path: Sintel/Sintel.de.srt
193+ length: 1652
194+ completed: 1652
195+ - path: Sintel/Sintel.en.srt
196+ length: 1514
197+ completed: 1514
198+ - path: Sintel/Sintel.es.srt
199+ ` ` `
200+
201+ For more information, see the [metrics reference](# metrics).
202+
183203🚀 ** That' s it!** We hope you enjoy using hTorrent.
184204
185205## Reference
@@ -242,7 +262,7 @@ Global Flags:
242262
243263` ` ` shell
244264$ htorrent info --help
245- Get streamable URLs from the gateway' s info endpoint
265+ Get streamable URLs and other info for a magnet link from the gateway
246266
247267Usage:
248268 htorrent info [flags]
@@ -262,6 +282,28 @@ Global Flags:
262282 -v, --verbose int Verbosity level (0 is disabled, default is info, 7 is trace) (default 5)
263283` ` `
264284
285+ # ### Metrics
286+
287+ ` ` ` shell
288+ $ htorrent metrics --help
289+ Get metrics from the gateway
290+
291+ Usage:
292+ htorrent metrics [flags]
293+
294+ Aliases:
295+ metrics, m
296+
297+ Flags:
298+ -p, --api-password string Username or OIDC access token for the gateway
299+ -u, --api-username string Username for the gateway (default " admin" )
300+ -h, --help help for metrics
301+ -r, --raddr string Remote address (default " http://localhost:1337/" )
302+
303+ Global Flags:
304+ -v, --verbose int Verbosity level (0 is disabled, default is info, 7 is trace) (default 5)
305+ ` ` `
306+
265307< /details>
266308
267309# ## Environment Variables
0 commit comments