mirror of
https://github.com/beetbox/beets.git
synced 2025-12-31 21:12:43 +01:00
Fix lastgenre source:track handling during imports
This commit is contained in:
parent
18e76f08c7
commit
9d09d6f317
1 changed files with 6 additions and 1 deletions
|
|
@ -451,15 +451,20 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
self._log.debug(
|
||||
"added last.fm album genre ({0}): {1}", src, album.genre
|
||||
)
|
||||
album.store()
|
||||
|
||||
# If we're using track-level sources, store the album genre only,
|
||||
# then also look up individual track genres.
|
||||
if "track" in self.sources:
|
||||
album.store(inherit=False)
|
||||
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
|
||||
)
|
||||
item.store()
|
||||
# Store the album genre and inherit to tracks.
|
||||
else:
|
||||
album.store()
|
||||
|
||||
else:
|
||||
item = task.item
|
||||
|
|
|
|||
Loading…
Reference in a new issue