Merge branch 'plugins' of http://git.louiz.org/poezio into plugins
This commit is contained in:
commit
3f4def1037
1 changed files with 1 additions and 9 deletions
|
@ -11,18 +11,10 @@ class Plugin(BasePlugin):
|
||||||
def command_mpd(self, args):
|
def command_mpd(self, args):
|
||||||
args = shell_split(args)
|
args = shell_split(args)
|
||||||
c = mpd.MPDClient()
|
c = mpd.MPDClient()
|
||||||
try:
|
|
||||||
c.connect(host=self.config.get('host', 'localhost'), port=self.config.get('host', '6600'))
|
c.connect(host=self.config.get('host', 'localhost'), port=self.config.get('host', '6600'))
|
||||||
except Exception as e:
|
|
||||||
self.core.information('%s' % (e,), 'Error')
|
|
||||||
return
|
|
||||||
password = self.config.get('password', '')
|
password = self.config.get('password', '')
|
||||||
if password:
|
if password:
|
||||||
try:
|
|
||||||
c.password(password)
|
c.password(password)
|
||||||
except Exception as e:
|
|
||||||
self.core.information('%s' % (e,), 'Error')
|
|
||||||
return
|
|
||||||
current = c.currentsong()
|
current = c.currentsong()
|
||||||
current_time = float(c.status()['elapsed'])
|
current_time = float(c.status()['elapsed'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue