X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Fclient.py;h=926e2952acc5a9c177d8b622f01bb4d620935217;hb=89a6fb2a516fc26e17771bda6213265dad6100dd;hp=63c2632c85910bb8582df793953b204e69361146;hpb=33841e8eea23d68659ff5279cc64976632bc4c5b;p=mpd-sima.git diff --git a/sima/client.py b/sima/client.py index 63c2632..926e295 100644 --- a/sima/client.py +++ b/sima/client.py @@ -162,9 +162,9 @@ class PlayerClient(Player): 'artists': None, 'nombid_artists': None, } - self._cache['artists'] = frozenset(self._client.list('artist')) + self._cache['artists'] = frozenset(self._execute('list', ['artist'])) if Artist.use_mbid: - self._cache['nombid_artists'] = frozenset(self._client.list('artist', 'musicbrainz_artistid', '')) + self._cache['nombid_artists'] = frozenset(self._execute('list', ['artist', 'musicbrainz_artistid', ''])) @blacklist(track=True) def find_track(self, artist, title=None): @@ -196,7 +196,7 @@ class PlayerClient(Player): found = False if artist.mbid: # look for exact search w/ musicbrainz_artistid - exact_m = self._client.list('artist', 'musicbrainz_artistid', artist.mbid) + exact_m = self._execute('list', ['artist', 'musicbrainz_artistid', artist.mbid]) if exact_m: [artist.add_alias(name) for name in exact_m] found = True @@ -332,11 +332,11 @@ class PlayerClient(Player): def add(self, track): """Overriding MPD's add method to accept add signature with a Track object""" - self._client.add(track.file) + self._execute('add', [track.file]) @property def artists(self): - return self._cache.get('artists') + return self._cache.get('artists') | self._cache.get('nombid_artists') @property def state(self):