IPFS Plugin¶
The ipfs
plugin makes it easy to share your library and music with friends.
The plugin uses ipfs for storing the library and file content.
Installation¶
This plugin requires go-ipfs to be running as a daemon and that the
associated ipfs
command is on the user’s $PATH
.
Once you have the client installed, enable the ipfs
plugin in your
configuration (see Using Plugins).
Usage¶
This plugin can store and retrieve music individually, or it can share entire library databases.
Adding¶
To add albums to ipfs, making them shareable, use the -a
or --add
flag. If used without arguments it will add all albums in the local library.
When added, all items and albums will get an “ipfs” field in the database
containing the hash of that specific file/folder. Newly imported albums will
be added automatically to ipfs by default (see below).
Retrieving¶
You can give the ipfs hash for some music to a friend. They can get that album
from ipfs, and import it into beets, using the -g
or --get
flag. If
the argument passed to the -g
flag isn’t an ipfs hash, it will be used as
a query instead, getting all albums matching the query.
Configuration¶
The ipfs plugin will automatically add imported albums to ipfs and add those
hashes to the database. This can be turned off by setting the auto
option
in the ipfs:
section of the config to no
.
If the setting nocopy
is true (defaults false) then the plugin will pass the --nocopy
option when adding things to ipfs. If the filestore option of ipfs is enabled this will mean files are neither removed from beets nor copied somewhere else.