-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lastgenre: Fix track-level handling, multi-genre keep, force behaviour, logging #4982
base: master
Are you sure you want to change the base?
Commits on Oct 31, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 182dbd7 - Browse repository at this point
Copy the full SHA 182dbd7View commit details -
Fix track-level genre handling in lastgenre plugin
When `lastgenre.source: track` is configured, - `lastgenre -a` _should not_ fall back to the album level genre (by making use of the with_album=False kwarg of the Libary's get method). - `lastgenre -a`, when finally storing the genres of _an album_, should _not_ also write the tracks genres (by making use of the inherit=False kwarg of the Album's store method.
Configuration menu - View commit details
-
Copy full SHA for a1de6a9 - Browse repository at this point
Copy the full SHA a1de6a9View commit details -
Streamline lastgenre singleton log with album log
It was rather confusing that the lastgenre plugin, when handling singletons, sometimes showed that it applied genres from last.fm and sometimes didn't (it did only in debug log). This streamlines the behaviour: - Change debug to info log. - Streamline wording. - Display details about the track.
Configuration menu - View commit details
-
Copy full SHA for 6326b4f - Browse repository at this point
Copy the full SHA 6326b4fView commit details -
Handle dups of existing genres in lastgenre plugin
When handling existing comma-separated genres in the _get_genre method of the plugin, make sure duplicate genres are removed.
Configuration menu - View commit details
-
Copy full SHA for 1ac2220 - Browse repository at this point
Copy the full SHA 1ac2220View commit details -
Configuration menu - View commit details
-
Copy full SHA for f8f3190 - Browse repository at this point
Copy the full SHA f8f3190View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b0fce2 - Browse repository at this point
Copy the full SHA 2b0fce2View commit details -
Another round of lastgenre logging nitpicks
- Printing out album/item in default format could lead to unreadable clutter depending on the user's configured formats. - The album's name and the individual tracks' title should be just sufficient to provide context as well readability. - Log like this while importing as well as in standalone runs.
Configuration menu - View commit details
-
Copy full SHA for 2082b9c - Browse repository at this point
Copy the full SHA 2082b9cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 174a615 - Browse repository at this point
Copy the full SHA 174a615View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a68d70 - Browse repository at this point
Copy the full SHA 8a68d70View commit details -
Use provided deduplicate function for keep_allowed
generation, instead of a simple set(). This way we keep the original order of genres.
Configuration menu - View commit details
-
Copy full SHA for e8dcaa7 - Browse repository at this point
Copy the full SHA e8dcaa7View commit details -
Add lastgenre keep_allowed options (-k/-K)
- Default to False. - During PR#4982 discussions we came to the conclusion that the following behaviour would be a good new default choice: - Keep whitelisted existing genres - Only Fetch last.fm genres for empty tags. - To get this we also have to change the default of the force option!!! - Resulting in "force: no" and "keep_allowed: yes"; see Case 4 in PR#4982 description - Options are not put to use yet, just defined and defaults set!
Configuration menu - View commit details
-
Copy full SHA for dff1270 - Browse repository at this point
Copy the full SHA dff1270View commit details -
Docs for lastgenre keep_allowed/force
Keep both options' "Configuration" chapter texts as compact as possible, while linking to a new chapter that describes all 4 possible combinations in detail.
Configuration menu - View commit details
-
Copy full SHA for 8345934 - Browse repository at this point
Copy the full SHA 8345934View commit details -
Implement --force and --keep-allowed behaviours
- Retrieving, filtering and deduplicating present genres of Items/Albums via separate methods. - Implement all four cases of behaviour as described in PR#4982 - Issues: - There is quite some unnecessary spliting of genres from strings into lists and the other way round happening throughout the plugin. - In the case where existing genres get "augmented" with last.fm genres, we might end up with _more_ genres than the configured limit.
Configuration menu - View commit details
-
Copy full SHA for 63e4c0c - Browse repository at this point
Copy the full SHA 63e4c0cView commit details -
Refactor keep/new genres combination
- Handle genre combination logic in a well documented helper function that also include type hints. - Throughout the _get_genre function rename the result variable to new_genres to make it clearly descriptive. - Rewrite thze _get_genre function's docstring.
Configuration menu - View commit details
-
Copy full SHA for 3ff7075 - Browse repository at this point
Copy the full SHA 3ff7075View commit details -
Configuration menu - View commit details
-
Copy full SHA for a56098f - Browse repository at this point
Copy the full SHA a56098fView commit details