diff options
author | jerous <jerous@gmail.com> | 2008-06-12 01:31:27 +0200 |
---|---|---|
committer | jerous <jerous@gmail.com> | 2008-06-12 01:32:08 +0200 |
commit | a97bd77f927c1c34787bdc5e23bdac17e24225a4 (patch) | |
tree | 78e7ca7d9bc56f7e895b2ab1b4b326fac3a06bdd /plugins/MPD.py | |
parent | d948985110a4c1350a2fc114f520eac36c795ba1 (diff) |
loading dynamically all plugins in ./plugins/*.py
Diffstat (limited to 'plugins/MPD.py')
-rw-r--r-- | plugins/MPD.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/plugins/MPD.py b/plugins/MPD.py new file mode 100644 index 0000000..b6d7d4e --- /dev/null +++ b/plugins/MPD.py @@ -0,0 +1,25 @@ +from PyQt4 import QtGui +from clMonty import monty +from clPlugin import * +from misc import * +from clSettings import settings, mpdSettings + +class pluginMPD(Plugin): + def __init__(self, winMain): + Plugin.__init__(self, winMain, 'MPD') + def getInfo(self): + return "Provides an interface to the MPD settings." + + + def _getSettings(self): + return [ + ['host', 'Host', 'Host where mpd resides.', QtGui.QLineEdit(settings.get('host', 'localhost'))], + ['port', 'Port', 'Port of mpd.', QtGui.QLineEdit(settings.get('port', '6600'))], + ['music_directory', 'Music directory', 'Root directory where all music is located.', QtGui.QLineEdit(mpdSettings.get('music_directory')), mpdSettings], + ['', 'Update database', 'Updates the database.\nUse this if you have changed the music_directory. Updating will save all entries on the MPD tab.', Button('Update db', self.onBtnUpdateDBClick)], + ] + def onBtnUpdateDBClick(self): + self.saveSettings() + monty.updateDB([mpdSettings.get('music_directory')]) + pass + |