Increase max number of Spotify search results

This commit is contained in:
Stein Magnus Jodal 2011-08-13 17:39:14 +02:00
parent 6a470f9694
commit 28257306a4
2 changed files with 7 additions and 1 deletions

View File

@ -50,6 +50,9 @@ v0.6.0 (in development)
- Unescape all incoming MPD requests. (Fixes: :issue:`113`)
- Increase the maximum number of results returned by Spotify searches from 32
to 100.
**multi-backend changes**
- Remove `destroy()` methods from backend controller and provider APIs, as it

View File

@ -151,9 +151,12 @@ class SpotifySessionManager(BaseThread, PyspotifySessionManager):
"""Search method used by Mopidy backend"""
def callback(results, userdata=None):
# TODO Include results from results.albums(), etc. too
# TODO Consider launching a second search if results.total_tracks()
# is larger than len(results.tracks())
playlist = Playlist(tracks=[
SpotifyTranslator.to_mopidy_track(t)
for t in results.tracks()])
queue.put(playlist)
self.connected.wait()
self.session.search(query, callback)
self.session.search(query, callback, track_count=100,
album_count=0, artist_count=0)