summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2010-08-27 19:40:10 +0200
committerAnton Khirnov <wyskas@gmail.com>2010-08-27 19:40:10 +0200
commite57f8fa529bf6d99ef11fc1aa5b50615d9fc85c8 (patch)
treee39781f5f1f44d9ce40aa5649d0b7696dcff0b40
parentfb168fe66b42193b47d754c0e0e4a38fb73c1370 (diff)
mpclient: add update/rescan database functions
-rw-r--r--nephilim/mpclient.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/nephilim/mpclient.py b/nephilim/mpclient.py
index fd3524a..e26f3a3 100644
--- a/nephilim/mpclient.py
+++ b/nephilim/mpclient.py
@@ -235,6 +235,16 @@ class MPClient(QtCore.QObject):
iterator over all Songs in the database as the argument.
"""
self._command('listallinfo', callback = lambda data: callback(self._parse_songs(data)))
+ def update_database(self):
+ """
+ Initiates a database update.
+ """
+ self._command('update')
+ def rescan_database(self):
+ """
+ Initiase a rebuild of database from scratch.
+ """
+ self._command('rescan')
## searching ##
def find(self, callback, *args):