mirror of
https://github.com/beetbox/beets.git
synced 2026-02-22 23:33:50 +01:00
Document ordering of the genre split separator
This commit is contained in:
parent
1b326ea5dc
commit
151468ee37
3 changed files with 10 additions and 2 deletions
|
|
@ -87,7 +87,7 @@ class Info(AttrDict[Any]):
|
|||
)
|
||||
if not genres:
|
||||
try:
|
||||
sep = next(s for s in [", ", "; ", " / "] if s in genre)
|
||||
sep = next(s for s in ["; ", ", ", " / "] if s in genre)
|
||||
except StopIteration:
|
||||
genres = [genre]
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class MultiGenreFieldMigration(Migration):
|
|||
with suppress(ConfigError):
|
||||
separators.append(beets.config["lastgenre"]["separator"].as_str())
|
||||
|
||||
separators.extend([", ", "; ", " / "])
|
||||
separators.extend(["; ", ", ", " / "])
|
||||
return unique_list(filter(None, separators))
|
||||
|
||||
@contextmanager
|
||||
|
|
|
|||
|
|
@ -26,6 +26,14 @@ New features
|
|||
splitting genre strings and writing the changes to both the database and media
|
||||
files. No manual action or ``mbsync`` is required.
|
||||
|
||||
The ``genre`` field is split by the first separator found in the string, in
|
||||
the following order of precedence:
|
||||
|
||||
1. :doc:`plugins/lastgenre` ``separator`` configuration
|
||||
2. Semicolon followed by a space
|
||||
3. Comma followed by a space
|
||||
4. Slash wrapped by spaces
|
||||
|
||||
Bug fixes
|
||||
~~~~~~~~~
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue