Skip Menu |

This queue is for tickets about the Audio-MPD CPAN distribution.

Report information
The Basics
Id: 29232
Status: resolved
Priority: 0/
Queue: Audio-MPD

People
Owner: jquelin [...] cpan.org
Requestors: bitsed [...] u.washington.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Audio MPD problem with double quotes
Date: Fri, 7 Sep 2007 18:48:40 -0700
To: bug-Audio-MPD [...] rt.cpan.org
From: David Bitseff <bitsed [...] u.washington.edu>
Hi, I have some songs in mpd that contain double quotes in the path name for the file. Passing these paths to the Audio::MPD::Collection::all_items or Audio::MPD::Playlist::add methods makes mpd return an error about too many arguments or an unknown path. I've been performing a substitution on the path before passing it to the methods, but this makes the interface to the module more difficult to use. I think this may be a bug in the Audio::MPD modules. I've attached a patch that helps with these two functions, but there could be similar problems elsewhere. I'm using: Audio-MPD-0.18.1 perl v5.8.8 built for i686-linux

Message body is not shown because sender requested not to inline it.

(sorry, i just noticed this open ticket. don't know why rt didn't send me a copy of the bug. i'll investigate. anyway) regarding your bug... when audio::mpd is adding a song, it performs the following in the connection to mpd: add "$path" this is because $path can contain spaces, and in that case, doing just: add $path_with_some_spaces will fail with the reason: ACK [2@0] {add} wrong number of arguments for "add" of course, the following: add "$path_with_some_double_quotes" is doomed to fail too. and to make it worse, mpd doesn't recognize single quotes '': add '$path' which is a pity, since i would have used either '' or "" depending on what contains the path to be added. in my mind, spaces in a song path is much more common than double-quotes... so i tend to leave it like that. or do you have a better idea?
oh, did not see the attached patch. patch works ok, applying it and releasing 0.18.2 sorry for the delay, marked bug fixed.