Skip to content

Add some more commands.#21

Merged
kstep merged 4 commits intokstep:masterfrom
tomprince:more-commands
Jan 30, 2017
Merged

Add some more commands.#21
kstep merged 4 commits intokstep:masterfrom
tomprince:more-commands

Conversation

@tomprince
Copy link
Copy Markdown
Contributor

No description provided.

@tomprince
Copy link
Copy Markdown
Contributor Author

The failure is due to https://github.com/Manishearth/rust-clippy/issues/1476

Comment thread src/client.rs
}

/// 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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