Skip to content
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

New command countplaylist #1992

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

jcorporation
Copy link
Member

Count the number of songs and their total playtime in the playlist.

@MaxKellermann
Copy link
Member

The documentation show describe the response, e.g. show an example response.
I don't like the command name, it's confusing - this sounds like counting playlists, but it actually counts the contents of the playlist. Maybe playlistsize? Slightly better, but not perfect. Can you come up with a better name? playlisttotals? (still ugly)

@jcorporation
Copy link
Member Author

playlistsize sounds good for me.

@naglis
Copy link
Contributor

naglis commented Feb 13, 2024

Another option could be playlistlength, which is also used in status response to indicate the length of the playlist (queue).

@jcorporation
Copy link
Member Author

Another option could be playlistlength, which is also used in status response to indicate the length of the playlist (queue).

We calculate the length and the duration with this command. playlistlength seems to explicit for me. I would vote for playlistsize, but it is the decision of @MaxKellermann.

@jcorporation
Copy link
Member Author

The documentation show describe the response, e.g. show an example response.

Added a example.

@MaxKellermann
Copy link
Member

Naming is hard. Harder than coding. :-)

What you do mean by "too explicit"? The "countplaylist" name is what I'd call too explicit (and too vague at the same time); one would expect one number as the result, the count of something, but not the duration of something.
"playlistsize" is unspecific what size is being reported, but I don't like it much because "size" can hardly about the total duration.
"playlistlength" is ambiguous enough that it can mean both "number of songs" or "total duration". Maybe that's just the ambiguity we need here.

I dislike all the names, but I dislike "playlistlength" the least.
(Oh and I hate most of the MPD protocol. Its naming scheme is a mess, but at least a mostly human-readable mess :-))

Count the number of songs and their total playtime in the playlist.
@jcorporation
Copy link
Member Author

Renamed to playlistlength

@MaxKellermann MaxKellermann merged commit 9eb26ab into MusicPlayerDaemon:master Feb 15, 2024
7 checks passed
@jcorporation jcorporation deleted the countplaylist branch May 12, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants