X-Git-Url: http://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fclient.py;h=b3c9591e28b7d949885d05ff68feac0a95a7c28f;hb=02644ed407ef89aa5fadee5344f62216572c7588;hp=96ca7250092072ddb9f51a4140ff505db6d270c1;hpb=808c3bab5145b16b314ab330a054284bc0811623;p=mpd-sima.git diff --git a/sima/client.py b/sima/client.py index 96ca725..b3c9591 100644 --- a/sima/client.py +++ b/sima/client.py @@ -86,10 +86,6 @@ class PlayerClient(Player): wrapper = self._execute return lambda *args: wrapper(command, args) - def __del__(self): - """Avoid hanging sockets""" - self.disconnect() - def _execute(self, command, args): self._write_command(command, args) return self._client_wrapper() @@ -231,7 +227,7 @@ class PlayerClient(Player): if len(arts) < 2: # TODO: better heuristic, use a ratio instead if album not in albums: albums.append(Album(name=album, albumartist=artist)) - elif album not in albums: + elif (album and album not in albums): self.log.debug('"{0}" probably not an album of "{1}"'.format( album, artist) + '({0})'.format('/'.join(arts))) return albums