Skip to content

Commit

Permalink
Fixed radio
Browse files Browse the repository at this point in the history
  • Loading branch information
plamere committed Sep 17, 2017
1 parent 1a40b13 commit ac8d339
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/plugs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ class SpotifyArtistRadio(object):
:param seed_artist_name_or_uri the name or uri of the seed artist
'''
def __init__(self, name, uri):
def __init__(self, name=None, uri=None):
self.name = 'Artist Radio'
self.artist_name = name
self.artist_uri = uri
Expand All @@ -1317,8 +1317,10 @@ def next_track(self):

if self.artist_uri:
seed_uri = self.artist_uri
else:
elif self.artist_name:
seed_uri = spotify_plugs._find_artist_by_name(sp, self.artist_name)
else:
seed_uri = None

if seed_uri:
results = sp.recommendations(seed_artists=[seed_uri], limit=100)
Expand Down

0 comments on commit ac8d339

Please sign in to comment.