sbussetti / deluge-siphon

A Chrome extension for sending torrents to your Deluge server.
http://sbussetti.github.io/deluge-siphon/
82 stars 22 forks source link

Incorrect handling #48

Closed OmgImAlexis closed 7 years ago

OmgImAlexis commented 7 years ago

For some reason this extension keeps thinking random links are torrents? Should it not only process magnet: and .torrent links?

For example on that triggered your extension was this.

https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_8.3_beta_4/Xcode_8.3_beta_4.xip
sbussetti commented 7 years ago

Yeah this is a tough one. Tracker sites have all kinds of link structures, not just magnet: and .torrent.
I'm always trying to improve the torrent link detection for the default matching logic. Thanks for the report, and I'll make some adjustments to try and improve things and fix the false positive you're reporting.

sbussetti commented 7 years ago

fixed 0.71.6 at least for the specific case you listed

OmgImAlexis commented 7 years ago

Since you mentioned sites have different link structures I may be able to help you with that as I work on Medusa so we have access to most torrent sites including private ones. If you look through the provider section of our code you'll see all the regex for torrent links.

Ideally I think you should be using .torrent and magnet: as the base and only adding in exceptions instead of trying to broadly as you're doing right now as for example I've had over 50 different issues with this being too broad just since I posted this original issue.

sbussetti commented 7 years ago

Woah. That's a super cool project, will definitely check it out.

Also, yeah my link matching regex has gotten a little.. baroque... over the years. I'll read through the providers as you suggest and make some updates. Thank you!!