-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grouping count command #50
Comments
it could use the first key received on the wire as delimiter. |
I don't see how to do it without changing or writing an alternative Another solution might be to give all possible delimiters, or a smaller set of them and let users append tags they might need. For instance: # in mpd.py
COUNT_GROUPING = ['artist', 'albumartist', 'album', 'genre']
.
.
.
def _fetch_count(self):
return self._fetch_objects(COUNT_GROUPING) Then it could be easily extend like that: >>> mpd.COUNT_GROUPING += [MyGroupingTag]
>>> cli.count('group', MyGroupingTag] |
I've added a example of a grouping count command in my repo, ref. count#50. |
sorry for the delay. I will have a look at it tomorrow. |
The grouping version of count command behave unexpectedly IMHO:
I would expect a list of object of that kind instead:
This object does not require extra processing to link grouping values with its playtime/songs stats.
I had a quick look at the raw MPD output, I think this might be tricky since the delimiter changes depending on the function signature. I don't have a straight forward solution to submit.
That's it
Thanks for your work
The text was updated successfully, but these errors were encountered: