beetbox / beetbox/beets

Ignore newlines in `paths` configuration for config file legibility

Open
#2,147 16 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

### Problem

The `beet` command completely hangs with all subcommands with the following config file. No feedback, no messages. I can only make it work if I completely comment the `path:` section on config file. The problematic config file is below...
### Setup
- OS: Fedora 23
- Python version: 2.7
- beets version: 1.3.13 (from Fedora official packages)
- Turning off plugins made problem go away (yes/no): no

```
directory: /home/aviram/Music
library: library.db
plugins: importadded lyrics embedart the fetchart chroma inline

original_date: yes
per_disc_numbering: yes

asciify_paths: no

replace:
'\.\.\.': …
'No\.': №
'\#': ♯
'\:': ∶
'\?': ⁇
'/': /
'\\': \
'\|': │
'\>': >
'\<': <
'\*': ✱
'\&': &
'[\x00-\x1f]': _
\s+$: ''
^\s+: ''

the:
a: no
the: yes
strip: yes

item_fields:
disc_and_track: |
if disctotal == 1:
return u'{%02d}'.format(track)
else:
if disctitle:
return u'{%02d} {}/{%02d}'.format(disc, disctitle, track)
else:
return u'{%02d·{%02d}'.format(disc, track)

title_with_artist: |
if artist == albumartist:
return u'{}'.format(title)
else:
return u'{} ♫ {}'.format(artist,title)

paths:
default: |
%the{$albumartist}/
%ifdef{$original_year,$original_year • ,%ifdef{$year,$year • }}$album/
$disc_and_track $title_with_artist

mpb:1: |
Brazil/%the{$albumartist}/
%ifdef{$original_year,$original_year • ,%ifdef{$year,$year • }}$album/
$disc_and_track $title_with_artist

mib:1: |
Brazil Jazz and Fusion/%the{$albumartist}/
%ifdef{$original_year,$original_year • ,%ifdef{$year,$year • }}$album/
$disc_and_track $title_with_artist

jazz:1: |
Jazz, Fusion etc/%the{$albumartist}/
%ifdef{$original_year,$original_year • ,%ifdef{$year,$year • }}$album/
$disc_and_track $title_with_artist

clas:1: |
Classical/%the{$albumartist}/
%ifdef{$original_year,$original_year • ,%ifdef{$year,$year • }}$album/
$disc_and_track $title_with_artist

pop:1: |
Pop/%the{$albumartist}/
%ifdef{$original_year,$original_year • ,%ifdef{$year,$year • }}$album/
$disc_and_track $title_with_artist

world:1: |
World/%the{$albumartist}/
%ifdef{$original_year,$original_year • ,%ifdef{$year,$year • }}$album/
$disc_and_track $title_with_artist

lounge:1: |
Lounge/%the{$albumartist}/
%ifdef{$original_year,$original_year • ,%ifdef{$year,$year • }}$album/
$disc_and_track $title_with_artist

amb:1: |
Ambient/%the{$albumartist}/
%ifdef{$original_year,$original_year • ,%ifdef{$year,$year • }}$album/
$disc_and_track $title_with_artist

singleton: Non-Album/$artist ♫ $title

format_album: $albumartist ♫ $album
format_item: $artist ♫ $album ♫ $title

lyrics:
sources: [lyricwiki, lyrics.com, musixmatch]
google_API_key: REDACTED
google_engine_ID: REDACTED
force: no
auto: yes
fallback:

verbose: 0
max_filename_length: 0
time_format: '%Y-%m-%d %H:%M:%S'
clutter: [Thumbs.DB, .DS_Store]
ignore: [.*, '*~', System Volume Information]

sort_case_insensitive: yes
sort_album: albumartist+ album+
sort_item: artist+ album+ disc+ track+

pluginpath: []

musicbrainz:
host: musicbrainz.org
ratelimit: 1
ratelimit_interval: 1.0
searchlimit: 5

ui:
terminal_width: 80
length_diff_thresh: 10.0
color: yes
colors:
text_success: green
text_warning: yellow
text_error: red
text_highlight: red
text_highlight_minor: lightgray
action_default: turquoise
action: blue

art_filename: folder
fetchart:
minwidth: 0
sources:
- coverart
- itunes
- amazon
- albumart
- google
- wikipedia
cautious: no
maxwidth: 0
google_search: no
auto: yes
cover_names:
- cover
- front
- art
- album
- folder
remote_priority: no
enforce_ratio: no
thumbnails:
force: no
auto: yes
dolphin: no
embedart:
compare_threshold: 0
auto: yes
ifempty: no
maxwidth: 0

id3v23: yes
import:
write: yes
copy: yes
move: no
link: no
delete: no
resume: ask
incremental: no
quiet_fallback: skip
none_rec_action: ask
timid: no
log:
autotag: yes
quiet: no
singletons: no
default_action: apply
languages: []
detail: yes
flat: no
group_albums: no
pretend: no

chroma:
auto: yes
match:
strong_rec_thresh: 0.04
medium_rec_thresh: 0.25
rec_gap_thresh: 0.25
max_rec:
missing_tracks: medium
unmatched_tracks: medium
distance_weights:
source: 2.0
artist: 3.0
album: 3.0
media: 1.0
mediums: 1.0
year: 1.0
country: 0.5
label: 0.5
catalognum: 0.5
albumdisambig: 0.5
album_id: 5.0
tracks: 2.0
missing_tracks: 0.9
unmatched_tracks: 0.6
track_title: 3.0
track_artist: 2.0
track_index: 1.0
track_length: 2.0
track_id: 5.0
preferred:
countries: []
media: []
original_year: no
ignored: []
required: []
track_length_grace: 10
track_length_max: 30

importadded:
preserve_mtimes: no

statefile: state.pickle
threaded: yes
terminal_encoding:
path_sep_replace: _
timeout: 5.0

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.