Electorrent icon indicating copy to clipboard operation
Electorrent copied to clipboard

Ability to load .magnet files

Open peterbuga opened this issue 5 years ago • 4 comments

Client:

  • [ ] µTorrent
  • [ ] qBittorrent
  • [x] Transmission
  • [ ] rTorrent

Description: This is not an issue but more like a quick improvement (i think). So far I'm able to drag'n'drop .torrent files with not problem and also load mangnet links from clipboard. In my current setup I have a torrent blackhole that saves .magnet links when a torrent is not found, I think a quick check if the dragged file has an .magnet extension + valid magnet format will improve a bit the app.

Thanks for all the hard work!

peterbuga avatar Jan 26 '19 12:01 peterbuga

That is a good idea. The more use cases we can cover the better. Do you know anything about the encoding and structure of a .magnet file? I assume it contains a single utf-8 encoded line with the magnet URL itself?

tympanix avatar Jan 26 '19 14:01 tympanix

I assume you're right. I have to admit I've done 0 reading to the code to see exactly what happens behind the scenes (i'm not fluent in latest in practices 😬) but for example if I open the .magnet file in a text editor, copy the the whole magnet link from there (which is exactly the one you will get from a normal website) and then CMD + I (macOS) it loads perfectly.

So I was thinking, the same way you load/read a .torrent file + the way you load a clipboard-magnet url you could add the ability to load .magnet files too (shouldn't be too hard, in theory at least). let me know if my explanation makes any sense 😅

peterbuga avatar Jan 26 '19 20:01 peterbuga

Yes that makes sense. Following your description the file seems to contain only the magnet link itself. I would be able to use existing functionality like you mention above. Thanks for reporting :+1:

tympanix avatar Jan 26 '19 20:01 tympanix

thanks also for looking into it 👍!

peterbuga avatar Jan 27 '19 12:01 peterbuga