]> kaliko git repositories - mpd-sima.git/blobdiff - sima/client.py
Converging webservices plugins
[mpd-sima.git] / sima / client.py
index b3c9591e28b7d949885d05ff68feac0a95a7c28f..6cd3802396688a01bc683318815d5e40aedb6a54 100644 (file)
@@ -21,7 +21,7 @@ except ImportError as err:
 # local import
 from .lib.player import Player
 from .lib.track import Track
-from .lib.album import Album
+from .lib.meta import Album
 from .lib.simastr import SimaStr
 
 
@@ -57,7 +57,7 @@ def blacklist(artist=False, album=False, track=False):
     return decorated
 
 class PlayerClient(Player):
-    """MPC Client
+    """MPD Client
     From python-musicpd:
         _fetch_nothing  …
         _fetch_item     single str
@@ -69,7 +69,7 @@ class PlayerClient(Player):
         _fetch_songs    list of dict, especially tracks
         _fetch_plugins,
     TODO: handle exception in command not going through _client_wrapper() (ie.
-          find_aa, remove…)
+          remove…)
     """
     database = None  # sima database (history, blaclist)
 
@@ -329,6 +329,7 @@ class PlayerClient(Player):
     def disconnect(self):
         # Try to tell MPD we're closing the connection first
         try:
+            self._client.noidle()
             self._client.close()
         # If that fails, don't worry, just ignore it and disconnect
         except (MPDError, IOError):