configurable max filename length

This commit is contained in:
Adrian Sampson 2013-02-08 10:54:19 -08:00
parent b9cb3980c2
commit f652662d5b
2 changed files with 5 additions and 1 deletions

View file

@ -28,6 +28,7 @@ replace:
'\s+$': ''
path_sep_replace: _
art_filename: cover
max_filename_length: 200
plugins: []
pluginpath: []

View file

@ -1197,7 +1197,10 @@ class Library(BaseLibrary):
subpath += extension.lower()
# Truncate too-long components.
subpath = util.truncate_path(subpath, pathmod)
subpath = util.truncate_path(
subpath, pathmod,
beets.config['max_filename_length'].get(int),
)
if fragment:
return subpath