Magnet

From VuzeWiki
Jump to: navigation, search

Definition[edit]

  • Azureus supports magnet links like magnet:?xt=urn:btih:IJBDPDSBT4QZLBIJ6NX7LITSZHZQ7F5I for downloads, which means you don't even need the .torrent file to start a download, instead Azureus will fetch the torrent from other peers on the Distributed Database.
  • The magnet link consists of the prefix magnet:?xt=urn:btih: and the base32() encoded SHA1 of the torrent's info dictionary (known as torrent-hash or infohash). Please note that's the base32-encoding of the torrent-hash's binary (20byte) representation, not the hexadecimal representation.
  • Since version 4.3.0.1 Vuze supports also the newer 40-byte HEX-encoding style of the hash in the magnet link.

The official documentation of magnet-URIs can be found here: http://magnet-uri.sourceforge.net/

How To[edit]

Windows users[edit]

Open manually

You can open them via File -> Open -> Location (Ctrl+L) or as a commandline parameter appended to the Azureus launcher or Java call.

Open automatically

Windows users can link Azureus to magnet URIs with the magnet-URI handler. Azureus 2.3.0.6 and later will do that automatically. If another program has 'taken over' the magnet protocol, "Options > Interface > Reset explorer file associations (.torrent)" {at the bottom} will make Azureus the default again.

Mac users & others[edit]

There are several methods of making Vuze your default application for opening magnet links. For beginners, its best to make your internet browser automatically associate the file extension to the application. This can be done regardless of whether you have previously selected another application as its default, or if this is your first time. It should be noted that this method may also be used by Windows users.

Firefox users

Edit -> Preferences -> Applications -> magnet

  • To save time you may enter 'magnet' into the search bar and the result will show up immediately. To the right you will see action and a drop down menu with various application options. If you do not see the application you wish, then select 'user other...' and find the application in your OS (usually found in the application folder).
Chrome users

If opening a magnet link does nothing:

  • Quit Chrome. Open Terminal and type "open /Users/YOUR USER NAME/Library/Application Support/Google/Chrome" and hit enter. You need to edit a file in this directory called "Local State". Open it in TextEdit or something similar. Search for a line with "magnet" in it. On that line, change 'true' to 'false' so that the line now reads "magnet": false, . Save. You may need to update read/write permissions on this file in order to save, in which case type "chmod 777 /Users/YOUR USER NAME/Library/Application Support/Google/Chrome/Local\ State" into Terminal and hit enter and then update the Local State file as before. Restart Chrome.

^^THIS DOESNT WORK. Firstly can't open that folder. When I navigate to the file "Local State" and search for "magnet" it returns no results...

^^ IT WOKS. If "magnet" doesn't exist just add the line (under, for example, the line "mailto"). Remember to quit Chrome, as it rewrites the file on exit.

If magnet links open in different application:

  • Download RCDefaultApp. Go to the 'urls' tab and look for 'magnet'. Change the Default Application to Vuze. If it's not in the dropdown, select 'other' and then select Vuze.

Ubuntu/Kubuntu[edit]

You will need to create a 'vuze.desktop' file to describe the Vuze application by creating the file

/usr/share/applications/vuze.desktop

with the following contents:

[Desktop Entry]
Categories=Java;Network;FileTransfer;P2P
Commenten_US=Multimedia Bittorrent Client
Comment=Multimedia Bittorrent Client
Encoding=UTF-8
Exec=vuze "%U"
GenericNameen_US=Multimedia Bittorrent Client
GenericName=Multimedia Bittorrent Client
Icon=vuze.png
MimeType=x-scheme-handler/magnet;application/x-bittorrent;
Nameen_US=Vuze
Name=Vuze
Path=<installation_dir>
StartupNotify=true
StartupWMClass=Vuze
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

Make sure you replace the Path=<installation_dir> with a reference to the directory where you installed Vuze (the one that has Azureus2.jar etc in it)

You also need to create a file

/usr/bin/vuze

with contents

#!/bin/bash

cd <installation_dir>

./vuze "$@"

again, replace <installation_dir> appropriately, and make sure this is executable via

chmod +x /usr/bin/vuze

Register Vuze with the desktop manager as follows:

Gnome[edit]

gconftool-2 -t string -s /desktop/gnome/url-handlers/magnet/command "<installation_dir>/vuze %U"
gconftool-2 -s /desktop/gnome/url-handlers/magnet/needs_terminal false -t bool
gconftool-2 -t bool -s /desktop/gnome/url-handlers/magnet/enabled true

substituting <installation_dir> again

KDE[edit]

xdg-mime default vuze.desktop x-scheme-handler/magnet 

Gnone/KDE[edit]

Update the desktop database:

apt-get install desktop-file-utils    # if you don't have it installed already
update-desktop-database

If you still end up with another torrent downloader (e.g. ktorrent) being invoked when hitting a magnet URI then uninstall it.

Alternatively[edit]

  • Copy the magnet link to clipboard
  • In Vuze: File -> Open -> Torrent File... click on 'Add from Clipboard'

Restrictions[edit]

A magnet link won't work with secure / private torrents.


Read the Azureus FAQ