Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix torrent download extension override #539

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KaseiFR
Copy link

@KaseiFR KaseiFR commented Apr 2, 2022

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)
  • Bug fix (non-breaking change which fixes an issue - semver PATCH)

The Firefox bug was fixed in version 87.
The API data handler streaming feature is now opt-in, and controls
whether the file type is overridden.
@jesec
Copy link
Owner

jesec commented Apr 24, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants