summaryrefslogtreecommitdiff
path: root/nephilim/mpclient.py
diff options
context:
space:
mode:
Diffstat (limited to 'nephilim/mpclient.py')
-rw-r--r--nephilim/mpclient.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nephilim/mpclient.py b/nephilim/mpclient.py
index 66d1aa1..21cd511 100644
--- a/nephilim/mpclient.py
+++ b/nephilim/mpclient.py
@@ -48,6 +48,8 @@ class MPClient(QtCore.QObject):
_db_timer_id = None #for querying db updates
_db_update = None #time of last db update
+ __stats = {'artists': '0', 'albums' : '0', 'songs' : '0', 'uptime' : '0',
+ 'playtime' : '0', 'db_playtime' : '0', 'db_update' : '0'}
# SIGNALS
connect_changed = QtCore.pyqtSignal(bool)
@@ -168,6 +170,8 @@ class MPClient(QtCore.QObject):
def stats(self):
"""Get MPD statistics."""
+ if not self.__check_command_ok('stats'):
+ return self.__stats
return self._client.stats()
def repeat(self, val):