From e57f8fa529bf6d99ef11fc1aa5b50615d9fc85c8 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 27 Aug 2010 19:40:10 +0200 Subject: mpclient: add update/rescan database functions --- nephilim/mpclient.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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): -- cgit v1.2.3