diff --git a/README.rst b/README.rst index ae5a11e..a0704a7 100644 --- a/README.rst +++ b/README.rst @@ -61,6 +61,8 @@ v1.0.0 (UNRELEASED) - Update to work with new playback API in Mopidy 1.0 +- Update to work with new search API in Mopidy 1.0 + v0.3.1 (2014-01-28) ------------------- diff --git a/mopidy_subsonic/library.py b/mopidy_subsonic/library.py index 8aed18a..b7dd561 100644 --- a/mopidy_subsonic/library.py +++ b/mopidy_subsonic/library.py @@ -14,7 +14,7 @@ def __init__(self, *args, **kwargs): super(SubsonicLibraryProvider, self).__init__(*args, **kwargs) self.remote = self.backend.remote - def find_exact(self, query=None, uris=None): + def _find_exact(self, query=None, uris=None): if not query: # Fetch all artists(browse library) return SearchResult( @@ -26,7 +26,10 @@ def find_exact(self, query=None, uris=None): tracks=self.remote.get_tracks_by( query.get('artist'), query.get('album'))) - def search(self, query=None, uris=None): + def search(self, query=None, uris=None, exact=False): + if exact: + return self._find_exact(query=query, uris=uris) + logger.debug('Query "%s":' % query) artist, album, title, any = None, None, None, None