Compare commits

...

3 Commits

Author SHA1 Message Date
Martin Wagner 71a4a7d3bb
Merge pull request #75 from Newbytee/fix-build-instructions
Use `meson setup` in build instructions
2023-08-02 15:20:17 +02:00
Stefan Hansson f7e2a6c17a
Use `meson setup` in build instructions
Running `setup` without explicitly mentioning it is depreciated and will
be removed in a future version of Meson, so let's do it the correct way.
2023-08-02 12:37:40 +02:00
Martin Wagner b0c0a29291 removed workaround for python-mpd2<3.1 2023-05-04 18:16:36 +02:00
3 changed files with 2 additions and 33 deletions

View File

@ -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

View File

@ -1,3 +1,3 @@
python-mpd2 >=1.1
python-mpd2 >=3.1
PyGObject
pycairo

View File

@ -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))