From 9d4653f92f7bc39912b634f316448ad84204b4f4 Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Thu, 23 Jan 2025 09:03:50 +0100 Subject: [PATCH] Final lastgenre docstring nitpicks and a tiny docs fix. --- beetsplug/lastgenre/__init__.py | 24 ++++++++++++------------ docs/plugins/lastgenre.rst | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index 5f0955bcfe..33e40d859f 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -259,9 +259,9 @@ def _last_lookup(self, entity, method, *args): whose arguments are given in the sequence `args`. The genre lookup is cached based on the entity name and the arguments. - Before the lookup, each argument has some Unicode characters replaced - with rough ASCII equivalents in order to return better results from the - Last.fm database. + Before the lookup, each argument has the "-" Unicode character replaced + with its rough ASCII equivalents in order to return better results from + the Last.fm database. """ # Shortcut if we're missing metadata. if any(not s for s in args): @@ -322,21 +322,21 @@ def _get_genre( ) -> tuple[Union[str, None], ...]: """Get the final genre string for an Album or Item object. - `self.sources` specifies allowed genre sources (track, ablum, artist). - Together with several fallback scenarious, the following stages are run - through: + `self.sources` specifies allowed genre sources. Starting with the first + source in this tuple, the following stages run through until a genre is + found or no options are left: - track (for Items only) - album - - artist, albumartist or (for Various Artists albums) the "most - popular track genre" is used. + - artist, albumartist or "most popular track genre" (for VA-albums) - original fallback - - fallback (configured value) + - configured fallback - None A `(genre, label)` pair is returned, where `label` is a string used for - logging that describes the result. For example, "keep + artist" - indicates that existing genres were combined with new last.fm genres, - while "artist" means only new last.fm genres are included. + logging. For example, "keep + artist, whitelist" indicates that existing + genres were combined with new last.fm genres and whitelist filtering was + applied, while "artist, any" means only new last.fm genres are included + and the whitelist feature was disabled. """ keep_genres = [] label = "" diff --git a/docs/plugins/lastgenre.rst b/docs/plugins/lastgenre.rst index 54e4de7612..48a8686fe8 100644 --- a/docs/plugins/lastgenre.rst +++ b/docs/plugins/lastgenre.rst @@ -146,7 +146,7 @@ Add new last.fm genres when **empty**. Any present tags stay **untouched**. **Combine** genres in present tags with new ones (be aware of that with an enabled ``whitelist`` setting, of course some genres might get cleaned up. To -make sure any exisitng genres remain, set ``whitelist: no``). +make sure any existing genres remain, set ``whitelist: no``). .. code-block:: yaml