Removed unnecessary logging
Also: nicer check that empty _playlist_uri_from_name is empty
This commit is contained in:
parent
cecc0f621f
commit
36a694617c
@ -272,13 +272,12 @@ class MpdContext(object):
|
||||
name = self.create_unique_name(playlist.name)
|
||||
self._playlist_uri_from_name[name] = playlist.uri
|
||||
self.playlist_name_from_uri[playlist.uri] = name
|
||||
logger.info("Refreshed name mappings for %u playlists" % len(self.playlist_name_from_uri))
|
||||
|
||||
def lookup_playlist_from_name(self, name):
|
||||
"""
|
||||
Helper function to retrieve a playlist from it's unique MPD name.
|
||||
"""
|
||||
if len(self._playlist_uri_from_name) == 0:
|
||||
if not self._playlist_uri_from_name:
|
||||
self.refresh_playlists_mapping()
|
||||
if name not in self._playlist_uri_from_name:
|
||||
return None;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user