mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-12 06:39:31 +01:00
Re-enable Last.fm similar tag cloud
This commit is contained in:
@@ -102,13 +102,7 @@ def artistlist_to_mbids(artistlist, forced=False):
|
||||
myDB.action('DELETE from newartists WHERE ArtistName=?', [artist])
|
||||
|
||||
# Update the similar artist tag cloud:
|
||||
# TODO: Fix last.fm api
|
||||
# logger.info('Updating artist information from Last.fm')
|
||||
|
||||
# try:
|
||||
# lastfm.getSimilar()
|
||||
# except Exception as e:
|
||||
# logger.warn('Failed to update artist information from Last.fm: %s' % e)
|
||||
lastfm.getSimilar()
|
||||
|
||||
|
||||
def addArtistIDListToDB(artistidlist):
|
||||
|
||||
@@ -62,6 +62,13 @@ def request_lastfm(method, **kwargs):
|
||||
|
||||
|
||||
def getSimilar():
|
||||
if not headphones.CONFIG.LASTFM_APIKEY:
|
||||
logger.info(
|
||||
'To update the Similar Artists cloud tag, create a Last.fm application api key '
|
||||
'and add it under the Advanced config tab'
|
||||
)
|
||||
return
|
||||
|
||||
myDB = db.DBConnection()
|
||||
results = myDB.select("SELECT ArtistID from artists ORDER BY HaveTracks DESC LIMIT 10")
|
||||
|
||||
|
||||
@@ -442,9 +442,8 @@ def libraryScan(dir=None, append=False, ArtistID=None, ArtistName=None,
|
||||
# if not append:
|
||||
# update_album_status()
|
||||
|
||||
# TODO: Fix last.fm api calls
|
||||
#if not append and not artistScan:
|
||||
#lastfm.getSimilar()
|
||||
if not append and not artistScan:
|
||||
lastfm.getSimilar()
|
||||
|
||||
if ArtistName:
|
||||
logger.info('Scanning complete for artist: %s', ArtistName)
|
||||
|
||||
Reference in New Issue
Block a user