do not catch errors, actually, since there’s a bug in the mpd lib with python3 that makes it impossible to catch.
This commit is contained in:
parent
9cdfe38bcc
commit
46ccf6a966
1 changed files with 1 additions and 9 deletions
|
@ -11,18 +11,10 @@ class Plugin(BasePlugin):
|
|||
def command_mpd(self, args):
|
||||
args = shell_split(args)
|
||||
c = mpd.MPDClient()
|
||||
try:
|
||||
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', '')
|
||||
if password:
|
||||
try:
|
||||
c.password(password)
|
||||
except Exception as e:
|
||||
self.core.information('%s' % (e,), 'Error')
|
||||
return
|
||||
c.password(password)
|
||||
current = c.currentsong()
|
||||
current_time = float(c.status()['elapsed'])
|
||||
|
||||
|
|
Loading…
Reference in a new issue