mirror of
https://github.com/beetbox/beets.git
synced 2025-12-27 19:12:40 +01:00
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.
This commit is contained in:
parent
9d09d6f317
commit
0c10635ff7
1 changed files with 12 additions and 6 deletions
|
|
@ -409,7 +409,9 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
for album in lib.albums(ui.decargs(args)):
|
||||
album.genre, src = self._get_genre(album)
|
||||
self._log.info(
|
||||
"genre for album {0} ({1}): {0.genre}", album, src
|
||||
'genre for album "{0.album}" ({1}): {0.genre}',
|
||||
album,
|
||||
src,
|
||||
)
|
||||
if "track" in self.sources:
|
||||
album.store(inherit=False)
|
||||
|
|
@ -423,7 +425,7 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
item.genre, src = self._get_genre(item)
|
||||
item.store()
|
||||
self._log.info(
|
||||
"genre for track {0} ({1}): {0.genre}",
|
||||
'genre for track "{0.title}" ({1}): {0.genre}',
|
||||
item,
|
||||
src,
|
||||
)
|
||||
|
|
@ -437,7 +439,7 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
item.genre, src = self._get_genre(item)
|
||||
item.store()
|
||||
self._log.info(
|
||||
"genre for track {0} ({1}): {0.genre}", item, src
|
||||
"genre for track {0.title} ({1}): {0.genre}", item, src
|
||||
)
|
||||
|
||||
lastgenre_cmd.func = lastgenre_func
|
||||
|
|
@ -449,7 +451,7 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
album = task.album
|
||||
album.genre, src = self._get_genre(album)
|
||||
self._log.debug(
|
||||
"added last.fm album genre ({0}): {1}", src, album.genre
|
||||
'genre for album "{0.album}" ({1}): {0.genre}', album, src
|
||||
)
|
||||
|
||||
# If we're using track-level sources, store the album genre only,
|
||||
|
|
@ -459,7 +461,9 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
for item in album.items():
|
||||
item.genre, src = self._get_genre(item)
|
||||
self._log.debug(
|
||||
"added last.fm item genre ({0}): {1}", src, item.genre
|
||||
'genre for track "{0.title}" ({1}): {0.genre}',
|
||||
item,
|
||||
src,
|
||||
)
|
||||
item.store()
|
||||
# Store the album genre and inherit to tracks.
|
||||
|
|
@ -470,7 +474,9 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
item = task.item
|
||||
item.genre, src = self._get_genre(item)
|
||||
self._log.debug(
|
||||
"added last.fm item genre ({0}): {1}", src, item.genre
|
||||
'genre for track "{0.title}" ({1}): {0.genre}',
|
||||
item,
|
||||
src,
|
||||
)
|
||||
item.store()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue