beets.io
Music organizer.
See beets.io Docker and Documentation.
Ports
beets.io Ports
Port
Protocol
Type
Purpose
8337
TCP
EXPOSED
Web GUI frontend for playback
Updated: None
Files
beets.io Files
Location
Purpose
/config.yaml
beets.io configuration
/library.sqlite3.db
beets.io library metadata database
Updated: None
Docker Creation
The UID/GID should be set to a user/group that have access to your media.
Map your media directly to where it was before on the docker container to prevent needing to modify any libraries.
beets:
image: linuxserver/beets:latest
restart: unless-stopped
environment:
- PGID=1001
- PUID=1001
- TZ=America/Los_Angeles
volumes:
- /data/downloads/complete/music:/data/downloads/complete/music
- /data/media/music:/data/media/music
- /data/services/beets:/config
- /etc/localtime:/etc/localtime:ro
Proxy will forward traffic to the container, so no ports need to be opened.
Reverse Proxy Setup
Allows you to isolate your containers as well as wrap connections in SSL. See NGINX for more details. See Setup Base Proxy Control for basic proxy configuration.
web:
host: 0.0.0.0
port: 8337
reverse_proxy: yes
Using Subdomains
server {
listen 443 ssl http2;
server_name beets.{DOMAIN} beets;
location / {
proxy_pass http://beets:8337;
include /etc/nginx/conf.d/proxy-control.conf;
proxy_set_header Host $host;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /beets;
}
}
Using Subpaths
server {
location /beets {
proxy_pass http://beets:8337;
include /etc/nginx/conf.d/proxy-control.conf;
proxy_set_header Host $host;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /beets;
}
}
Managing Library
sudo docker exec -it -u abc beets bash
Importing Music
beet import /path/to/music
Warning
Pay attention to unmatched tracks, these will not be imported if the current selection is choosen.
Note
It may freeze importing. Generally this is fingerprinting music and updating metadata with correct info/art. Let this run. Will be longer for larger number of imported items.
Chroma (fingerprinting), musicbrainz, and other background tasks will be executed simultaneously in the background for the given directory. This should be kept small, such as a single album or artist. This is slow.
All albums need to be decided on before import starts. Keep import small.
Generally, go through potential matches. Any non-exact matches are usually fairly in accurate.
Use
i
for musicbrainz ID if the top guesses are not accurate. This is helpful to force a specific ID.Duplicate albums that need to be disambiguated should be imported as normal. When prompted
This album is already in the library
, select the K eep option. This will useaunique
to disambiguate the albums.
Re-importing Music
Music may be re-imported if already existing. just use the library path.
beet import -L /data/media/music/existing/artist/album
Note
If you have incremental
enabled, you may have to remove the metadata
from the library before importing.
Adding to an Existing Album
Adding a track to an existing album is a bit confusing, especially if it is a compilation/various artist album.
Make sure to select the metadata tracks that match the album.
beet info {QUERY}
Select the correct album on the import prompt.
Beets will ask to merge, list a summary of existing and new tracks; open an additional shell, find the track locally and ensure there’s no collisions with the merge.
Select the correct album on the merged import prompt.
Fixing ‘featuring’ Tracks
The plugin ftintitle
generally takes care of this, but there are certain
cases where this is not the case. This addresses these cases.
ftintitle works by using the albumartist
as the real artist and
artist
field for featured artists (‘feat.’ artists).
beet modify albumartist='single artist' {QUERY}
Note
You should use list
to find appropriate data to match.
beet modify artist='single artist feat. other artist' {QUERY}
Note
Generally this is setup correctly in musicbrainz.
beet -v ftintitle {QUERY}
Note
This should pickup your artist changes and act appropriately.
Manually Moving Files
Sometimes if an import half-way through, some files will be imported, others will not.
beet move
Note
Use -p
to test before applying.
Update the Library
This will update the database with any new file metadata, as well as organize existing files according to metadata:
beet update
Note
Use -p
to test before applying.
Changing Music Metadata
Useful for fixing bad imports, or for getting music to re-import correctly.
beet modify [attribute]=[value] {QUERY}
Note
Ensure to use list
to make sure you are only modifying the tracks that
you want.
Removing Tracks
This is useful for re-importing tracks, as well as permenant deletion.
beet remove {QUERY}
Note
This will remove file metadata from library (does not delete files).
Use -d
to actually delete files.
Querying Music
By default queries all fields for matches. Can use path
specifier to
specify an exact file, as well as attribute matching. See additional querying
options.
Query Matching Fields
beet list {FIELD}:{VALUE}
Match Exact String
beet list 'some exact title'
Find Empty Fields
beet list [field]::^$
Match All Fields
beet list ":^$"
Path Matching
beet list path:/my/music/directory/or/file
Note
Path is implied with /
.
beet list /my/music/directory/or/file
Works as well.
Importing Gotchas
Sometimes beets just doesn’t import correctly.
Modify Pre-import Data
Use avprobe
and mid3v2 modify pre-import metadata. For cases where
pre-manipulation of track data will help for a better match, or fixing a bad
match detection.
mid3v2 -l {FILE}
mid3v2 -t 'new title' {FILE}
mid3v2 -T '1/5' {FILE}
mid3v2 -A 'new album' {FILE}
mid3v2 -a 'new artist' {FILE}
Note
In practice, usually just the track and title need to be changed. See man page for all options.
Get File Info/Track Length/Bitrate
avprobe {FILE}
Force Import a Track as a Single Specific Track
This will resolve tracks that are consistently mis-identified even after munging the metadata.
Find the recording ID for musicbrains (the individual track ID on musicbrainz).
bash beet import -s /import/album/track.mp3
Note
S option to import singleton.
I to select a recording ID.
Re-import the now correct track into the existing album. Find the album ID from musicbrains or existing album in beets.
beets beet import /data/media/music/Non-Albums/imported-track-from-above.mp3
Note
I to select a release ID.
M merge tracks into album.
References