config:beets
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
config:beets [2024/03/25 12:37] – [Show path in duplicate import warning] Wulf Rajek | config:beets [2024/12/24 01:08] (current) – [Path template information] Wulf Rajek | ||
---|---|---|---|
Line 7: | Line 7: | ||
< | < | ||
#mint21 | #mint21 | ||
- | sudo apt-get install libchromaprint1 | + | sudo apt-get install libchromaprint1 |
- | + | ||
- | sudo apt-get install | + | |
sudo apt-get remove python-pip | sudo apt-get remove python-pip | ||
sudo apt-get install python3-setuptools | sudo apt-get install python3-setuptools | ||
+ | |||
sudo easy_install pip | sudo easy_install pip | ||
pip install beets | pip install beets | ||
Line 20: | Line 19: | ||
pip install discogs-client | pip install discogs-client | ||
pip install beets-web-import | pip install beets-web-import | ||
+ | pip install python3-discogs-client | ||
+ | # see notes below to patch copyartifacts | ||
pip install beets-copyartifacts | pip install beets-copyartifacts | ||
- | 2to3-2.7 -w ~/ | ||
- | |||
- | #adjust as following: | ||
- | #line 104: | ||
- | file_ext = os.path.splitext(filename)[1].decode(' | ||
- | #line 143: | ||
- | print(' | ||
- | #line 147: | ||
- | print(' | ||
- | #line 156: | ||
- | print(' | ||
- | |||
- | #add line 127 | ||
- | dest_file = beets.util.bytestring_path(dest_file) | ||
- | |||
- | |||
- | vi ~/ | ||
- | change line 75 from | ||
- | def unidecode_punc_only(text): | ||
- | to | ||
- | def unicode_punc_only(text): | ||
- | |||
- | |||
#Buggy as of 19/ | #Buggy as of 19/ | ||
pip install beets-copyartifacts3 | pip install beets-copyartifacts3 | ||
pip install beets-extrafiles | pip install beets-extrafiles | ||
+ | |||
+ | #Mint22: | ||
+ | sudo apt-get install python3-acoustid libchromaprint1 mp3val flac | ||
+ | pipx install beets | ||
+ | pipx inject beets flask=2.2.5 discogs_client requests pylast pyacoustid pycairo pygobject python3-discogs-client discogs-client beets-copyartifacts beets-extrafiles | ||
+ | pipx inject beets beets-yearfixer beets-web-import | ||
+ | pipx inject beets git+https:// | ||
+ | |||
</ | </ | ||
Line 55: | Line 41: | ||
</ | </ | ||
- | Latest | + | As beets 1.6.0 is a bit buggy and 3 years old, use latest |
< | < | ||
pip uninstall beets | pip uninstall beets | ||
Line 61: | Line 47: | ||
</ | </ | ||
- | ====== | + | ====== |
+ | < | ||
+ | 2to3-2.7 -w ~/ | ||
- | https://github.com/edgars-supe/beets-importreplace | + | #Mint22: |
+ | sudo apt-get install 2to3 | ||
+ | 2to3 -w ~/.local// | ||
+ | </ | ||
+ | then adjust as following: | ||
< | < | ||
- | pip install git+https://github.com/ | + | #line 104: |
+ | file_ext = os.path.splitext(filename)[1].decode(' | ||
+ | #line 143: | ||
+ | print(' | ||
+ | #line 147: | ||
+ | print(' | ||
+ | #line 156: | ||
+ | print(' | ||
+ | |||
+ | #add line 127 | ||
+ | dest_file = beets.util.bytestring_path(dest_file) | ||
</ | </ | ||
- | + | Change the init: | |
- | add config and add importreplace to plugins config string: | + | |
< | < | ||
- | #replace unicode apostrophes from mb with ascii version in tags | + | vi ~/ |
- | importreplace: | + | </ |
- | | + | < |
- | - item_fields: | + | #change line 75 from |
- | | + | def unidecode_punc_only(text): |
- | | + | #to |
- | ' | + | def unicode_punc_only(text): |
- | ' | + | |
- | ' | + | |
</ | </ | ||
====== Unicode in Tag Patch ====== | ====== Unicode in Tag Patch ====== | ||
+ | |||
+ | NOTE: use import-replace plugin instead! | ||
MusicBrainz uses unicode characters for apostrophes, | MusicBrainz uses unicode characters for apostrophes, | ||
Line 242: | Line 243: | ||
search_ids: [] | search_ids: [] | ||
duplicate_action: | duplicate_action: | ||
+ | #duplicate verbose uses format_item settings | ||
+ | duplicate_verbose_prompt: | ||
bell: no | bell: no | ||
set_fields: {} | set_fields: {} | ||
Line 252: | Line 255: | ||
ignore: [" | ignore: [" | ||
ignore_hidden: | ignore_hidden: | ||
- | |||
# replace special characters in generated filenames | # replace special characters in generated filenames | ||
replace: | replace: | ||
Line 260: | Line 262: | ||
' | ' | ||
' | ' | ||
+ | # dot at end of directories causes problems with some clients on samba shares | ||
' | ' | ||
' | ' | ||
Line 267: | Line 270: | ||
' | ' | ||
' | ' | ||
+ | ' | ||
# double quotes to single quote | # double quotes to single quote | ||
'"': | '"': | ||
Line 291: | Line 295: | ||
track: [] | track: [] | ||
- | plugins: [fetchart, | + | plugins: [fetchart, |
# | # | ||
pluginpath: [] | pluginpath: [] | ||
Line 323: | Line 327: | ||
#Define how to show items using the list command (formerly list_format_item/ | #Define how to show items using the list command (formerly list_format_item/ | ||
format_item: | format_item: | ||
- | format_album: | + | format_album: |
# | # | ||
time_format: | time_format: | ||
Line 341: | Line 345: | ||
original_date: | original_date: | ||
album_year: f' | album_year: f' | ||
+ | album_fields: | ||
+ | totaltracks: | ||
+ | album_ends_with_ep: | ||
# Paths and filenames for music files relative to music directory | # Paths and filenames for music files relative to music directory | ||
Line 348: | Line 355: | ||
default: Album/ | default: Album/ | ||
singleton: Non-Album/ | singleton: Non-Album/ | ||
+ | albumtype: | ||
albumtype: | albumtype: | ||
comp: Compilations/ | comp: Compilations/ | ||
Line 357: | Line 365: | ||
ratelimit: 1 | ratelimit: 1 | ||
ratelimit_interval: | ratelimit_interval: | ||
- | searchlimit: | + | searchlimit: |
extra_tags: [] | extra_tags: [] | ||
Line 382: | Line 390: | ||
tracks: 4.0 #default 2 | tracks: 4.0 #default 2 | ||
missing_tracks: | missing_tracks: | ||
- | unmatched_tracks: | + | unmatched_tracks: |
track_title: | track_title: | ||
track_artist: | track_artist: | ||
Line 389: | Line 397: | ||
track_id: 5.0 | track_id: 5.0 | ||
preferred: | preferred: | ||
- | countries: [US, GB|UK, JP, DE] | + | countries: [' |
- | media: [CD, Digital Media|File] | + | media: ['Digital Media', ' |
original_year: | original_year: | ||
ignored: [] | ignored: [] | ||
Line 421: | Line 429: | ||
lyrics: | lyrics: | ||
- | auto: no | + | auto: yes |
on_import: true | on_import: true | ||
processes: 10 | processes: 10 | ||
Line 427: | Line 435: | ||
fallback: '' | fallback: '' | ||
+ | #moves featured artists from artists to the title field | ||
ftintitle: | ftintitle: | ||
auto: yes | auto: yes | ||
+ | format: feat. {0} | ||
#Scrub plugin removes all non-beet tags | #Scrub plugin removes all non-beet tags | ||
Line 440: | Line 450: | ||
edit: | edit: | ||
- | itemfields: track title artist album year | + | itemfields: track title artist album year albumartist artist_sort artist_credit |
albumfields: | albumfields: | ||
Line 448: | Line 458: | ||
duplicates: | duplicates: | ||
- | checksum: no # expensive | + | |
+ | #checksum: no | ||
#By default, the tie-breaking procedure favors the most complete metadata attribute set. If you would like to consider the lower bitrates as duplicates, for example, set | #By default, the tie-breaking procedure favors the most complete metadata attribute set. If you would like to consider the lower bitrates as duplicates, for example, set | ||
tiebreak: { items: [bitrate] } | tiebreak: { items: [bitrate] } | ||
Line 463: | Line 474: | ||
#manual analysis | #manual analysis | ||
#Note this takes about 10 seconds for 7 files which is about 6h for 15k songs. | #Note this takes about 10 seconds for 7 files which is about 6h for 15k songs. | ||
+ | |||
+ | web: | ||
+ | host: 0.0.0.0 | ||
+ | port: 8337 | ||
+ | |||
+ | webimport: | ||
+ | host: 0.0.0.0 | ||
+ | port: 8338 | ||
+ | |||
+ | bpd: | ||
+ | host: 127.0.0.1 | ||
+ | port: 6600 | ||
+ | password: seekrit | ||
+ | volume: 30 | ||
+ | |||
+ | acoustid: | ||
+ | apikey: 9NQqkUUg6p | ||
+ | |||
+ | # null/remove specific tag fields on import (not when importing as-is) | ||
+ | # regex condition on comments field, this removes useless comments: | ||
+ | zero: | ||
+ | fields: comments | ||
+ | comments: [EAC, LAME, from.+collection, | ||
+ | update_database: | ||
+ | |||
+ | # check integrity of files on import, note that mp3val | ||
+ | # required for mp3s: apt-get install mp3val | ||
+ | # mp3val is quite verbose, multiple stream errors indicate issues | ||
+ | badfiles: | ||
+ | check_on_import: | ||
+ | commands: | ||
+ | mp3: mp3val -f -si -nb -t | ||
+ | |||
+ | #replace unicode apostrophes from mb with ascii version in tags | ||
+ | importreplace: | ||
+ | replacements: | ||
+ | - item_fields: | ||
+ | album_fields: | ||
+ | replace: | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
</ | </ | ||
Line 493: | Line 546: | ||
beet import -A -C -W -I -s / | beet import -A -C -W -I -s / | ||
</ | </ | ||
+ | Update id3 tags after changing db | ||
+ | < | ||
+ | beet write | ||
+ | </ | ||
====== Addons ====== | ====== Addons ====== | ||
Line 648: | Line 704: | ||
====== importreplace ====== | ====== importreplace ====== | ||
- | A plugin for beets to perform regex replacements during import. | + | A plugin for beets to perform regex replacements during import, particularly useful to replace unicode apostrophes, |
https:// | https:// | ||
+ | |||
+ | Installation: | ||
+ | < | ||
+ | pip install git+https:// | ||
+ | </ | ||
+ | |||
+ | add config and add importreplace to plugins config string: | ||
+ | < | ||
+ | #replace unicode apostrophes from mb with ascii version in tags | ||
+ | importreplace: | ||
+ | replacements: | ||
+ | - item_fields: | ||
+ | album_fields: | ||
+ | replace: | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | </ | ||
+ | |||
+ | As this plugin works for import only, use the following to retag/ | ||
+ | < | ||
+ | #for albums: | ||
+ | beet import -L ": | ||
+ | |||
+ | #for singletons: | ||
+ | beet import -L -s ": | ||
+ | </ |
config/beets.1711370266.txt.gz · Last modified: by Wulf Rajek