Changelog and name change for #1156

This commit is contained in:
Adrian Sampson 2014-12-30 15:27:17 -04:00
parent e547426b8c
commit fd94094c1b
2 changed files with 10 additions and 8 deletions

View file

@ -239,7 +239,7 @@ class LastGenrePlugin(plugins.BeetsPlugin):
# Cached entity lookups.
def _cached_lookup(self, entity, method, *args):
def _last_lookup(self, entity, method, *args):
"""Get a genre based on the named entity using the callable `method`
whose arguments are given in the sequence `args`. The genre lookup
is cached based on the entity name and the arguments. Before the
@ -268,25 +268,25 @@ class LastGenrePlugin(plugins.BeetsPlugin):
def fetch_album_genre(self, obj):
"""Return the album genre for this Item or Album.
"""
return self._cached_lookup(u'album', LASTFM.get_album, obj.albumartist,
obj.album)
return self._last_lookup(u'album', LASTFM.get_album, obj.albumartist,
obj.album)
def fetch_album_artist_genre(self, obj):
"""Return the album artist genre for this Item or Album.
"""
return self._cached_lookup(u'artist', LASTFM.get_artist,
obj.albumartist)
return self._last_lookup(u'artist', LASTFM.get_artist,
obj.albumartist)
def fetch_artist_genre(self, item):
"""Returns the track artist genre for this Item.
"""
return self._cached_lookup(u'artist', LASTFM.get_artist, item.artist)
return self._last_lookup(u'artist', LASTFM.get_artist, item.artist)
def fetch_track_genre(self, obj):
"""Returns the track genre for this Item.
"""
return self._cached_lookup(u'track', LASTFM.get_track, obj.artist,
obj.title)
return self._last_lookup(u'track', LASTFM.get_track, obj.artist,
obj.title)
def _get_genre(self, obj):
"""Get the genre string for an Album or Item object based on

View file

@ -64,6 +64,8 @@ Fixed:
the import process. Thanks to :user:`Freso`. :bug:`1176` :bug:`1172`
* :doc:`/plugins/ftintitle`: Fix weird behavior when the same artist appears
twice in the artist string. Thanks to Marc Addeo. :bug:`1179` :bug:`1181`
* :doc:`/plugins/lastgenre`: Match songs more robustly when they contain
dashes. Thanks to :user:`djl`. :bug:`1156`
.. _API changes: http://developer.echonest.com/forums/thread/3650
.. _Plex: https://plex.tv/