New plex implementation
This commit is contained in:
parent
bd5b3538c8
commit
56e1061325
6 changed files with 121 additions and 6 deletions
|
|
@ -45,3 +45,9 @@ def recent_artists():
|
|||
page += 1
|
||||
|
||||
return [(n, m) for (n, m), c in counts.items() if c >= MIN_PLAYS]
|
||||
|
||||
def get_top_tracks(artist_name, limit=3):
|
||||
res = lf_request("artist.getTopTracks", artist=artist_name, limit=limit)
|
||||
if not res:
|
||||
return []
|
||||
return [t["name"] for t in res.get("toptracks", {}).get("track", [])]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue