Skip to content

Commit f4d6022

Browse files
committed
Disable last.fm getSimilar
1 parent 9ca87e2 commit f4d6022

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

headphones/lastfm.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ def request_lastfm(method, **kwargs):
6363

6464
def getSimilar():
6565
myDB = db.DBConnection()
66-
results = myDB.select("SELECT ArtistID from artists ORDER BY HaveTracks DESC")
66+
results = myDB.select("SELECT ArtistID from artists ORDER BY HaveTracks DESC LIMIT 10")
6767

6868
logger.info("Fetching similar artists from Last.FM for tag cloud")
6969
artistlist = []
7070

71-
for result in results[:12]:
71+
for result in results:
7272
data = request_lastfm("artist.getsimilar", mbid=result["ArtistId"])
7373

7474
if data and "similarartists" in data:

headphones/librarysync.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,9 @@ def libraryScan(dir=None, append=False, ArtistID=None, ArtistName=None,
442442
# if not append:
443443
# update_album_status()
444444

445-
if not append and not artistScan:
446-
lastfm.getSimilar()
445+
# TODO: Fix last.fm api calls
446+
#if not append and not artistScan:
447+
#lastfm.getSimilar()
447448

448449
if ArtistName:
449450
logger.info('Scanning complete for artist: %s', ArtistName)

0 commit comments

Comments
 (0)