Skip to content

[Feature]: Copy magnet link from stream context menu #1128

@duartebranco

Description

@duartebranco

Feature Description

When seeing the various streaming options for one particular movie/series, we can right click it and get these options:

  • Play
  • Copy Stream Link
  • Copy Download Video Link

But, there is currently no way to copy the actual magnet URI for a torrent stream. Having a "Copy Magnet Link" option would allow users to easily share the torrent or to open it in some torrent client, without having to manually look for the link.

This is especially useful, given that the download link, even though it allows to download the file, it forces the user to use the browser to mange its downloads, which is not ideal when comparing to a torrent client.

This applies to both the streaming options menu, as well as in the "..." options inside the actual player.

Proposed Solution

Add a "Copy magnet link" option that builds a magnet URI from the infoHash and sources fields already present in the stream data.

The magnet-uri package, which is already a project dependency, can be used to encode the link. The result would look like:

magnet:?xt=urn:btih:<infoHash>&dn=<stream name>&tr=<tracker1>&tr=<tracker2>

The option would only appear for torrent-based streams (i.e. streams that have an infoHash). The existing magnet-link icon from @stremio/stremio-icons can be used for the menu entry.

Additional Context or Screenshots

in the stream options menu:

Image

inside the player:

Image

Code of Conduct

  • I agree

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementCurrent feature enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions