[build] Remove PKGBUILD
Actually is part of the AUR repo, and keeping those two files in sync is problematic. fixes #510
This commit is contained in:
parent
a135be6cc2
commit
25bed762fc
2 changed files with 10 additions and 44 deletions
|
@ -3,6 +3,8 @@
|
|||
|
||||
"""Displays information about the current song in mpd.
|
||||
|
||||
If mpd is not running or mpc fails for some reason, it will show "n/a".
|
||||
|
||||
Requires the following executable:
|
||||
* mpc
|
||||
|
||||
|
@ -61,6 +63,7 @@ class Module(bumblebee.engine.Module):
|
|||
bumblebee.output.Widget(name="mpd.repeat"),
|
||||
]
|
||||
super(Module, self).__init__(engine, config, widgets)
|
||||
self._mpd_running = False
|
||||
|
||||
if not self.parameter("host"):
|
||||
self._hostcmd = ""
|
||||
|
@ -85,10 +88,13 @@ class Module(bumblebee.engine.Module):
|
|||
self._tags = defaultdict(lambda: '')
|
||||
|
||||
def hidden(self):
|
||||
return self._status is None
|
||||
if self._mpd_running == True and
|
||||
return self._mpd_running is True and self._status is None
|
||||
|
||||
@scrollable
|
||||
def description(self, widget):
|
||||
if not self._mpd_running:
|
||||
return "n/a"
|
||||
return string.Formatter().vformat(self._fmt, (), self._tags)
|
||||
|
||||
def update(self, widgets):
|
||||
|
@ -107,6 +113,7 @@ class Module(bumblebee.engine.Module):
|
|||
|
||||
def _load_song(self):
|
||||
info = ""
|
||||
self._mpd_running = True
|
||||
try:
|
||||
tags = ['name',
|
||||
'artist',
|
||||
|
@ -129,8 +136,8 @@ class Module(bumblebee.engine.Module):
|
|||
'mdate']
|
||||
joinedtags = "\n".join(["tag {0} %{0}%".format(tag) for tag in tags])
|
||||
info = bumblebee.util.execute('mpc -f ' + '"' + joinedtags + '"' + self._hostcmd)
|
||||
except RuntimeError:
|
||||
pass
|
||||
except Exception:
|
||||
self._mpd_running = False
|
||||
self._tags = defaultdict(lambda: '')
|
||||
self._status = None
|
||||
for line in info.split("\n"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue