'Refresh the playlists in :attr:`playlists`.
If ``uri_scheme`` is :class:`None`, all backends are asked to refresh.
If ``uri_scheme`` is an URI scheme handled by a backend, only that
backend is asked to refresh. If ``uri_scheme`` doesn\'t match any
current backend, nothing happens.
:param uri_scheme: limit to the backend matching the URI scheme
:type uri_scheme: string'

def refresh(self, uri_scheme=None):

    futures = {}
    backends = {}
    playlists_loaded = False
    for (backend_scheme, backend) in self.backends.with_playlists.items():
        backends.setdefault(backend, set()).add(backend_scheme)
    for (backend, backend_schemes) in backends.items():
        if ((uri_scheme is None) or (uri_scheme in backend_schemes)):
            futures[backend] = backend.playlists.refresh()
    for (backend, future) in futures.items():
        with _backend_error_handling(backend):
            future.get()
            playlists_loaded = True
    if playlists_loaded:
        listener.CoreListener.send(u'playlists_loaded')
