diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index 8c38eac31..c398bf7e3 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -114,7 +114,9 @@ def _strings_to_genre(tags): tags = out tags = [t.title() for t in tags] - return u', '.join(tags[:config['lastgenre']['count'].get(int)]) + return config['lastgenre']['separator'].get(unicode).join( + tags[:config['lastgenre']['count'].get(int)] + ) def fetch_genre(lastfm_obj): """Return the genre for a pylast entity or None if no suitable genre @@ -217,6 +219,7 @@ class LastGenrePlugin(plugins.BeetsPlugin): 'source': 'album', 'force': True, 'auto': True, + 'separator': u', ', }) if self.config['auto']: diff --git a/docs/changelog.rst b/docs/changelog.rst index 12e1b61d9..5c09c88c4 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -27,6 +27,8 @@ New stuff: better proportion to other metrics. Also, options were added to specify custom thresholds and output formats. Thanks to Adam M. * Added the :ref:`after_write ` plugin event. +* :doc:`/plugins/lastgenre`: Separator in genre lists can now be + configured. Thanks to brilnius. Fixes: diff --git a/docs/plugins/lastgenre.rst b/docs/plugins/lastgenre.rst index e6da9df83..7a4d19a51 100644 --- a/docs/plugins/lastgenre.rst +++ b/docs/plugins/lastgenre.rst @@ -92,8 +92,12 @@ of the ``count`` config option:: lastgenre: count: 3 -Comma-separated lists of up to *count* genres will then be used instead of -single genres. +Lists of up to *count* genres will then be used instead of single genres. The +genres are separated by commas by default, but you can change this with the +``separator`` config option:: + + lastgenre: + separator: ' / ' `Last.fm`_ provides a popularity factor, a.k.a. *weight*, for each tag ranging from 100 for the most popular tag down to 0 for the least popular.