mirror of
https://github.com/beetbox/beets.git
synced 2026-02-16 20:35:23 +01:00
export: Correctly export 'path' field when requested
This fixes a crash that could be seen by running:
beet export --include=path .
This commit is contained in:
parent
591038d246
commit
aae422eaf2
1 changed files with 5 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ from xml.etree import ElementTree
|
|||
from datetime import datetime, date
|
||||
from beets.plugins import BeetsPlugin
|
||||
from beets import ui
|
||||
from beets import util
|
||||
import mediafile
|
||||
from beetsplug.info import make_key_filter, library_data, tag_data
|
||||
|
||||
|
|
@ -138,6 +139,10 @@ class ExportPlugin(BeetsPlugin):
|
|||
|
||||
data = key_filter(data)
|
||||
|
||||
for key, value in data.items():
|
||||
if isinstance(value, bytes):
|
||||
data[key] = util.displayable_path(value)
|
||||
|
||||
if file_format_is_line_based:
|
||||
export_format.export(data, **format_options)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue