flood icon indicating copy to clipboard operation
flood copied to clipboard

Fix torrent download extension override

Open KaseiFR opened this issue 3 years ago • 1 comments
trafficstars

Description

When downloading a single mkv file, Flood is changing its content-type to webm, and it makes Firefox change the file extension to .webm, which is annoying. This PR fixes that by making the content-type override opt-in and only enabled in the file preview links.

I'd also like to add direct download links to the torrent files modal, next to the clipboard icon (or the reverse, make the file link a download and add a preview button). This would be useful when a torrent contains a few files that can be downloaded manually instead of going through the tar export. What do you think ?

Types of changes

  • [ ] Breaking change (changes that break backward compatibility of public API or CLI - semver MAJOR)
  • [ ] New feature (non-breaking change which adds functionality - semver MINOR)
  • [x] Bug fix (non-breaking change which fixes an issue - semver PATCH)

KaseiFR avatar Apr 02 '22 16:04 KaseiFR

This is another Firefox bug, which shall be reported to them. The extension declared by content-disposition should be prioritized over the MIME type. I will do it.

Meanwhile, we can use the User Agent condition for this.

jesec avatar Apr 24 '22 07:04 jesec