bitmagnet-io / bitmagnet

A self-hosted BitTorrent indexer, DHT crawler, content classifier and torrent search engine with web UI, GraphQL API and Servarr stack integration.
https://bitmagnet.io/
MIT License
2.05k stars 78 forks source link

[WebUI] Direct link to a torrent #192

Open DyonR opened 3 months ago

DyonR commented 3 months ago

Is your feature request related to a problem? Please describe

It would be nice to be able to 'directly link' to a torrent based on a info hash.

Describe the solution you'd like

My bitmagnet is located at 192.168.2.0, but if I have a info hash of a torrent, I would like to be able to quickly look it up with an URL like this:
http://192.168.2.0/#INFO_HASH#
This would be similar to how open DHT crawlers do it, for example BTDigg:
https://btdig.com/#INFO_HASH#

If I would host this publicly (or share internally), it would also be an nice way to share links, so one could inspect the files and size first.

Describe alternatives you've considered

Alternative is to do nothing and just let the user share a hash and search for it, which is 5 steps compared to 1 step (click on the link).

  1. Go to the page
  2. Copy the given hash
  3. Paste the given hash
  4. Press enter/hit the search/refresh icon
  5. Click on the result to see info

Additional context

Low priority, more a QOL feature than a real necessity.

mgdigital commented 3 months ago

Agreed on this! At some point the web UI will become more than just a single page application - which is a bit of work in itself involving setting up Angular routing. I can think of plenty of stuff (including this) that would be great to expose as a dedicated URL in the UI. It'll be a case of prioritisation.

For me the single biggest win would be encoding the current search UI state into the URL allowing copy-paste into the same view. The search query should already be working with info hashes so that would give you a basic way of linking to a particular torrent though it wouldn't be a "pretty" URL or a dedicated view for individual torrents. You could also link to particular tags in a similar way for building shareable lists. Aside from that, some sort of status/monitoring page is high priority.

We probably need an overall plan for what a more fleshed out UI would look like and what fits in where, before implementing any piecemeal bits of it in isolation.

If anyone is interested in contributing work on the web app that could accelerate things of course - frontend stuff isn't my main area, I'm figuring out the Angular stuff but I've probably missed plenty of tricks and best practices. There are some basic structural and performance issues I'm aware of that will need addressing as it continues to be built out.