return
assert len(results) == 2, results
playlists = results[0]
- loaded_playlists = [] # TODO
if 'playlist' in self._c:
for playlist in playlists:
- if playlist in loaded_playlists:
+ if self._c['playlist'].is_playlist_loaded(playlist):
self._c['playlist'].update_playlist(playlist)
else:
self._c['playlist'].add_playlist(playlist)
"""
self._playlists[playlist.name] = playlist
+ def is_playlist_loaded(self, playlist):
+ """Return `True` if a playlist is loaded, `False` otherwise.
+ """
+ return playlist.name in self._playlists
+
class Playlist (Panel, wx.Panel):
""":class:`wx.Panel` subclass wrapper for :class:`Tree`.