'Maintain map between playlists and unique playlist names to be used by
MPD.'

def refresh_playlists_mapping(self):

    if (self.core is None):
        return
    for playlist_ref in self.core.playlists.as_list().get():
        if (not playlist_ref.name):
            continue
        name = self._invalid_playlist_chars.sub(u'|', playlist_ref.name)
        self.insert(name, playlist_ref.uri, playlist=True)
