diff --git a/mopidy/backends/local/__init__.py b/mopidy/backends/local/__init__.py index 0f9b7502..436f43d4 100644 --- a/mopidy/backends/local/__init__.py +++ b/mopidy/backends/local/__init__.py @@ -111,18 +111,20 @@ class Library(object): """ raise NotImplementedError - # TODO: support case with returning all tracks? - # TODO: remove uris? + # TODO: remove uris, replacing it with support in query language. + # TODO: remove exact, replacing it with support in query language. def search(self, query=None, exact=False, uris=None): """ Search the library for tracks where ``field`` contains ``values``. :param query: one or more queries to search for :type query: dict - :param exact: look for exact matches? + :param exact: whether to look for exact matches :type query: boolean :param uris: zero or more URI roots to limit the search to :type uris: list of strings or :class:`None` :rtype: :class:`mopidy.models.SearchResult` """ raise NotImplementedError + + # TODO: add file browsing support. diff --git a/mopidy/backends/local/library.py b/mopidy/backends/local/library.py index eadea027..d8cc2320 100644 --- a/mopidy/backends/local/library.py +++ b/mopidy/backends/local/library.py @@ -4,11 +4,12 @@ import logging from mopidy.backends import base -logger = logging.getLogger('mopidy.backends.local') +logger = logging.getLogger('mopidy.backends.local.library') class LocalLibraryProvider(base.BaseLibraryProvider): """Proxy library that delegates work to our active local library.""" + def __init__(self, backend, library): super(LocalLibraryProvider, self).__init__(backend) self._library = library @@ -25,7 +26,7 @@ class LocalLibraryProvider(base.BaseLibraryProvider): if not self._library: return [] track = self._library.lookup(uri) - if not uri: + if track is None: logger.debug('Failed to lookup %r', uri) return [] return [track]