Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
Martin Wagner | 71a4a7d3bb | |
Stefan Hansson | f7e2a6c17a | |
Martin Wagner | b0c0a29291 |
|
@ -63,7 +63,7 @@ Run:
|
|||
```bash
|
||||
git clone https://github.com/SoongNoonien/mpdevil.git
|
||||
cd mpdevil
|
||||
meson builddir --prefix=/usr/local
|
||||
meson setup builddir --prefix=/usr/local
|
||||
sudo ninja -C builddir install
|
||||
sudo glib-compile-schemas /usr/local/share/glib-2.0/schemas
|
||||
sudo gtk-update-icon-cache
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
python-mpd2 >=1.1
|
||||
python-mpd2 >=3.1
|
||||
PyGObject
|
||||
pycairo
|
||||
|
|
|
@ -661,37 +661,6 @@ class Client(MPDClient):
|
|||
# connect
|
||||
self._settings.connect("changed::socket-connection", lambda *args: self.reconnect())
|
||||
|
||||
# workaround for list group
|
||||
# see: https://github.com/Mic92/python-mpd2/pull/187
|
||||
def _parse_objects(self, lines, delimiters=[], lookup_delimiter=False):
|
||||
obj = {}
|
||||
for key, value in self._parse_pairs(lines):
|
||||
key = key.lower()
|
||||
if lookup_delimiter and key not in delimiters:
|
||||
delimiters = delimiters + [key]
|
||||
if obj:
|
||||
if key in delimiters:
|
||||
if lookup_delimiter:
|
||||
if key in obj:
|
||||
yield obj
|
||||
obj = obj.copy()
|
||||
while delimiters[-1] != key:
|
||||
obj.pop(delimiters[-1], None)
|
||||
delimiters.pop()
|
||||
else:
|
||||
yield obj
|
||||
obj = {}
|
||||
elif key in obj:
|
||||
if not isinstance(obj[key], list):
|
||||
obj[key] = [obj[key], value]
|
||||
else:
|
||||
obj[key].append(value)
|
||||
continue
|
||||
obj[key] = value
|
||||
if obj:
|
||||
yield obj
|
||||
_parse_objects_direct = _parse_objects
|
||||
|
||||
# overloads to use Song class
|
||||
def currentsong(self, *args):
|
||||
return Song(super().currentsong(*args))
|
||||
|
|
Loading…
Reference in New Issue