despotify: Add library track lookup
Adding track from library search result to playlist now works.
This commit is contained in:
parent
b641a47c66
commit
ed39840c67
@ -36,6 +36,10 @@ class DespotifyCurrentPlaylistController(BaseCurrentPlaylistController):
|
|||||||
|
|
||||||
|
|
||||||
class DespotifyLibraryController(BaseLibraryController):
|
class DespotifyLibraryController(BaseLibraryController):
|
||||||
|
def lookup(self, uri):
|
||||||
|
track = self.backend.spotify.lookup(uri.encode(ENCODING))
|
||||||
|
return self.backend.translate.to_mopidy_track(track)
|
||||||
|
|
||||||
def search(self, type, what):
|
def search(self, type, what):
|
||||||
query = u'%s:%s' % (type, what)
|
query = u'%s:%s' % (type, what)
|
||||||
result = self.backend.spotify.search(query.encode(ENCODING))
|
result = self.backend.spotify.search(query.encode(ENCODING))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user