Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

can we send multiple mpd commands? #6

Closed
andig opened this issue Aug 17, 2015 · 2 comments
Closed

can we send multiple mpd commands? #6

andig opened this issue Aug 17, 2015 · 2 comments

Comments

@andig
Copy link
Owner

andig commented Aug 17, 2015

From what I've seen, sending a command always needs to read the response. However, we also have code like this:

case 'savepl':
    if (isset($_GET['plname']) && $_GET['plname'] != '') {
        sendMpdCommand($mpd,"rm \"" .html_entity_decode($_GET['plname']) . "\"");
        sendMpdCommand($mpd,"save \"" .html_entity_decode($_GET['plname']) . "\"");
        $res = readMpdResponse($mpd);
    }
    break;

Is this broken and should rather send+read response? How das mpd handle " signs?

@moodeaudio
Copy link

Yes broken although it does seem to work ok. I think should always b "send cmd + read response”.

On Aug 17, 2015, at 4:20 AM, andig notifications@github.com wrote:

From what I've seen, sending a command always needs to read the response. However, we also have code like this:

case 'savepl':
if (isset($_GET['plname']) && $_GET['plname'] != '') {
sendMpdCommand($mpd,"rm "" .html_entity_decode($_GET['plname']) . """);
sendMpdCommand($mpd,"save "" .html_entity_decode($_GET['plname']) . """);
$res = readMpdResponse($mpd);
}
break;
Is this broken and should rather send+read response? How das mpd handle " signs?


Reply to this email directly or view it on GitHub #6.

@andig
Copy link
Owner Author

andig commented Aug 17, 2015

Fixed throughout.

@andig andig closed this as completed Aug 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants