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

[Bug]: qBittorrent does not register magnet links and torrent files #14838

Open
3 tasks done
itsHardStyl3r opened this issue Feb 3, 2025 · 0 comments
Open
3 tasks done
Labels

Comments

@itsHardStyl3r
Copy link

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues/PRs to ensure it has not already been reported or fixed.
  • I have verified that I am using the latest version of Scoop and corresponding bucket.

Package Name

qbittorrent

Expected/Current Behaviour

Currently, qBittorrent is not associated with magnet links and torrent files. This results in, for example, magnet links not being recognized by the browser to launch the app. You should, theoretically, be able to set it up manually, e.g. set qBittorrent association for .torrent files in Windows Explorer or similar. We're looking for out-of-the-box solution.

Steps to Reproduce

1. Add extras bucket to scoop. (scoop bucket add extras)
2. Install qBittorrent from extras. (scoop install extras/qbittorrent)
3. Notice that no associations have been made.
4. Open a magnet link in the browser or via command, e.g. start magnet:?xt=urn:btih:TEST
5. No application is there to open magnets.

Possible Solution

Create files: install-associations.reg and uninstall-associations.reg as follows:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\qBittorrent]
"InstallLocation"="$qbit"

; Register qBittorrent as possible default program for .torrent files and magnet links
[HKEY_CURRENT_USER\Software\qBittorrent\Capabilities]
"ApplicationDescription"="A BitTorrent client in Qt"
"ApplicationName"="qBittorrent"

[HKEY_CURRENT_USER\Software\qBittorrent\Capabilities\FileAssociations]
".torrent"="qBittorrent.File.Torrent"

[HKEY_CURRENT_USER\Software\qBittorrent\Capabilities\UrlAssociations]
"magnet"="qBittorrent.Url.Magnet"

[HKEY_CURRENT_USER\Software\RegisteredApplications]
"qBittorrent"="Software\\qBittorrent\\Capabilities"

; Register qBittorrent ProgIDs
[HKEY_CURRENT_USER\Software\Classes\qBittorrent.File.Torrent]
@="Torrent File"

[HKEY_CURRENT_USER\Software\Classes\qBittorrent.File.Torrent\DefaultIcon]
@="\"$qbit\\qbittorrent.exe\",1"

[HKEY_CURRENT_USER\Software\Classes\qBittorrent.File.Torrent\shell\open\command]
@="\"$qbit\\qbittorrent.exe\" \"%1\""

[HKEY_CURRENT_USER\Software\Classes\qBittorrent.Url.Magnet]
@="Magnet URI"

[HKEY_CURRENT_USER\Software\Classes\qBittorrent.Url.Magnet\DefaultIcon]
@="\"$qbit\\qbittorrent.exe\",1"

[HKEY_CURRENT_USER\Software\Classes\qBittorrent.Url.Magnet\shell\open\command]
@="\"$qbit\\qbittorrent.exe\" \"%1\""

[HKEY_CURRENT_USER\Software\Classes\.torrent]
"Content Type"="application/x-bittorrent"
"PerceivedType"="application"
@="qBittorrent.File.Torrent"

[HKEY_CURRENT_USER\Software\Classes\magnet]
@="URL:Magnet URI"
"Content Type"="application/x-magnet"
"URL Protocol"=""

[HKEY_CURRENT_USER\Software\Classes\magnet\shell\open\command]
@="\"$qbit\\qbittorrent.exe\" \"%1\""

And

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\qBittorrent]
[HKEY_CURRENT_USER\Software\RegisteredApplications]
"qBittorrent"=-
[-HKEY_CURRENT_USER\Software\Classes\qBittorrent.File.Torrent]
[-HKEY_CURRENT_USER\Software\Classes\qBittorrent.Url.Magnet]
[-HKEY_CURRENT_USER\Software\Classes\.torrent]
[-HKEY_CURRENT_USER\Software\Classes\magnet]

; Delete associations that Windows Explorer did on its own.
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.torrent]

I based those files on qbittorrent/qBittorrent#19446 (comment). Elaborated in PR.
Of course, the files are prepared to be used with a modified manifest, which is in my pull request. Simply replace $qbit with install location, e.g. C:\Users\{USER_NAME}\scoop\apps\qbittorrent\current for now.

Scoop and Buckets Version

PS C:\GitHub\Extras-qBit\scripts\qbittorrent> scoop --version
Current Scoop version:
859d1db5 (HEAD -> master, tag: v0.5.2, origin/master, origin/HEAD) chore(release): Bump to version 0.5.2 (#6080)

'main' bucket:
39a33fd29 (HEAD -> master, origin/master, origin/HEAD) sonar-scanner: Update to version 7.0.1.4817

'extras' bucket:
2873562cd (HEAD -> master, origin/master, origin/HEAD) kate: Update to version 24.12-8917

'nonportable' bucket:
9a38109a (HEAD -> master, origin/master, origin/HEAD) office-365-apps-np: Update to version 0.79.2-24

'java' bucket:
23385ab1 (HEAD -> master, origin/master, origin/HEAD) openjdk-ea: Update to version 24-34-ea

'qbit' bucket:
fcb200bb4 (HEAD -> master, origin/master, origin/HEAD) qbittorrent: Add file associations

Scoop Config

PS C:\GitHub\Extras-qBit\scripts\qbittorrent> scoop config


last_update           : 2025-02-03T20:13:09.2865180+01:00
aria2-warning-enabled : False
scoop_repo            : https://github.com/ScoopInstaller/Scoop
scoop_branch          : master
aria2-enabled         : False

PowerShell Version

PS C:\GitHub\Extras-qBit\scripts\qbittorrent> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.26100.2161
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.26100.2161
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Additional Softwares

No response

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

No branches or pull requests

1 participant