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

Expose option in WebUI to disable download confirmation prompt on magnet link #22153

Open
graysky2 opened this issue Jan 12, 2025 · 2 comments
Open
Labels
Feature request WebUI WebUI-related issues/changes

Comments

@graysky2
Copy link

Suggestion

Expose an option in the Web UI to enable/disable "display torrent content and some options" to allow users this choice as it exists in the fat client.

Use case

Simplify workflows

Extra info/examples/attachments

Context: #22152

@graysky2 graysky2 changed the title Expose optionin WebUI to disable download confirmation prompt on magnet link Expose option in WebUI to disable download confirmation prompt on magnet link Jan 12, 2025
@HanabishiRecca
Copy link
Contributor

I repost it here.

Magnet link handler was implemented in #10552 and never improved since. It shows the dialog unconditionally.

const handleDownloadParam = () => {
// Extract torrent URL from download param in WebUI URL hash
const downloadHash = "#download=";
if (!location.hash.startsWith(downloadHash))
return;
const url = decodeURIComponent(location.hash.substring(downloadHash.length));
// Remove the processed hash from the URL
history.replaceState("", document.title, (location.pathname + location.search));
showDownloadPage([url]);
};

So there is a room for improvement.

@thalieht thalieht added the WebUI WebUI-related issues/changes label Jan 12, 2025
@graysky2
Copy link
Author

graysky2 commented Jan 12, 2025

As we wait, I found this little function added my shellrc a handy workaround:

mag() {
  echo -n "Enter the magnet URL: "
  read mag 
  # get session cookie
  curl -k -X POST -c "$XDG_RUNTIME_DIR"/cookies.txt -d "username=admin&password=mypass \
    https://ip.of.qbtnox:8080/api/v2/auth/login || return 1
  # push a magnet url to the daemon
  [[ -f "$XDG_RUNTIME_DIR/cookies.txt" ]] &&
    curl -k -b "$XDG_RUNTIME_DIR"/cookies.txt https://ip.of.qbtnox:8080/api/v2/torrents/add -X POST -F "urls=$mag"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request WebUI WebUI-related issues/changes
Projects
None yet
Development

No branches or pull requests

3 participants