Skip to content

Add some more commands. #21

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

Merged
merged 4 commits into from
Jan 30, 2017
Merged

Add some more commands. #21

merged 4 commits into from
Jan 30, 2017

Conversation

tomprince
Copy link
Contributor

No description provided.

@tomprince
Copy link
Contributor Author

}

/// Find all songs in the db that match query and adds them to current playlist.
pub fn findadd(&mut self, query: &Query) -> Result<()> {
Copy link
Owner

@kstep kstep Jan 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought of joining up searchadd and findadd together into a single method, as the functionality of these commands are essentially the same, except for case-sensitivity, which can be passed either as a separate parameter, or as a field in Query object (debatable).

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On one hand, having something like that would make sense. On the other, keeping them separate makes it easier for somebody looking at MPD documentation to figure out what the corresponding method is. Given that most of the methods currently do match with the underlying MPD commands, I'd be inclined to at least have a lower-level interface that more closely mirrors the underlying protocol.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge it as is for now, but I think this point should be thought through more thoroughly.

@kstep kstep merged commit 95f30e0 into kstep:master Jan 30, 2017
@tomprince tomprince deleted the more-commands branch February 3, 2017 03:51
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.

2 participants