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 for using selected_files from previous downloads #8413

Merged
merged 3 commits into from
Jan 25, 2025

Conversation

egbertbouman
Copy link
Member

@egbertbouman egbertbouman commented Jan 24, 2025

Fixes #8381.

Also fixes:

  • Unique key error in SelectRemotePath.
  • An issue with the SaveAs dialog only being shown after the metadata has been downloaded, removing any feedback that something is happening. Only happened when coming from AddTorrent (introduced in Fixed exception on bad torrent URL #8403).
  • Stop requesting metainfo as soon as the user starts typing. Instead, wait until "Add" is pressed.

@egbertbouman egbertbouman force-pushed the various_fixes branch 3 times, most recently from 06f6af9 to 4045f93 Compare January 24, 2025 15:28
@egbertbouman
Copy link
Member Author

validate

@egbertbouman egbertbouman marked this pull request as ready for review January 24, 2025 15:32
Comment on lines 161 to 162
// Disable for all errors, except metainfo errors (timeouts)
setDisabled(response.error.message !== "metainfo error");
Copy link
Contributor

@qstokkink qstokkink Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not enough to revert #8403, it reintroduces #8360 for slow loading sites. For example, entering https://www.wish.com/ and clicking Download, leads to:

I appreciate your cause of "removing any feedback that something is happening", but this is not sufficient. Please either fix your fix, undo your unfix, or add a spinner or loadbar? I'm O.K. with anything but breaking it again.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I've removed my fix.

Copy link
Contributor

@qstokkink qstokkink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reflecting on my earlier request for changes:

I think the only way out of this cycle, is to make some edits to the core endpoint.

@egbertbouman egbertbouman merged commit 648ae33 into Tribler:main Jan 25, 2025
7 checks passed
@egbertbouman
Copy link
Member Author

I think the only way out of this cycle, is to make some edits to the core endpoint.

Or just disable the "Download" button while fetching from HTTP(s). An easy fix.

@qstokkink
Copy link
Contributor

I'm all for an easy fix. The "add torrent" endpoint does a lot of stuff though, so I think we should be careful about covering our bases. I'm a bit wary of this code now, because my own "easy fix" ignored magnets while improving http.

For example, I know the endpoint follows HTTP 300 redirects as well. So, could we get a situation where a magnet link is allowed to be added without metainfo, but a magnet link from a HTTP 300 redirect does have to wait? 🤷‍♂️

@egbertbouman
Copy link
Member Author

I'll leave this one to you then.

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

Successfully merging this pull request may close these issues.

Importing a magnet and downloading a single file replicates it for subsequent magnets
2 participants