mirror of
https://github.com/asapach/peerflix-server.git
synced 2026-04-25 14:45:50 +03:00
[PR #172] [MERGED] Magnet link from hash only #186
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/asapach/peerflix-server/pull/172
Author: @Coriou
Created: 10/21/2019
Status: ✅ Merged
Merged: 10/21/2019
Merged by: @asapach
Base:
master← Head:master📝 Commits (3)
93c6b49Generate magnet from hash only97baf20Fix: Generate magnet from hash only2259e0cFix: Generate magnet from hash only📊 Changes
1 file changed (+4 additions, -0 deletions)
View changed files
📝
server/store.js(+4 -0)📄 Description
Sometimes it's just easier to copy/paste a torrent's hash than it's full magnet URL (mostly on mobile devices).
This PR allows a hash to be dropped in the input and a valid magnet link will be generated and passed to
read-torrent.An added benefit of doing so is that it will use the trackers users pass in the options file instead of the trackers usually added to the magnet file by various sites.
Other types of links / uploads aren't affected.
Example: Pasting this
08ada5a7a6183aae1e09d831df6748d566095a10will retrieve the torrents metadata and start the download the same way it would if you pasted this: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&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrentThe example is using WebTorrent.io's "Sintel" torrent
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.