Re: URL safe characters?

cpd73 <cpd73.af5wgn-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
Newsgroups gmane.music.equipment.slimdevices.devel
Organization Logitech Squeezebox Forums
Message-ID <[email protected]>
gordonb3 wrote: 
> Sorry, still trying to grasp what you're doing here. As I understand you
> have a plugin that accesses an external service/app that returns a list
> of URI encoded file locations in an HTML body but those entries are then
> not communicated to LMS by accessing some URL but internally through the
> plugin method. If that accurately describes your workflow you need to
> use the internal representation of the file names which only encodes
> space characters (and possibly some characters that have special meaning
> in Perl).

My MusicSimilarity DSTM mixer makes a HTTP call to a Python app that
tries to get similar tracks. The response is a string of file:// URLs.
Python's URL escping seems to escape more characters than LMS's. When
tracks are received back from the service, the DSTM mixer adds them to
the queue. LMS does play the tracks, so URLs are valid. However, LMS
also persists the client's playlist - and this is where the error is
logged. When saving to disk LMS looks up the track in the DB, using the
URL. I -guessing- because of the different percent encoding this lookup
can fail, and an error is logged.

All URLs are local LMS file URLs - all files LMS knows about. The only
issue is the encoding used. I -think- LMS looks up tracks in its DB via
the URL - so tries to match the URL string against that in the DB.
Different encoding => different string, so lookup fails.



*Material debug:* 1. Launch via http: //SERVER:9000/material/?debug=json
(Use http: //SERVER:9000/material/?debug=json,cometd to also see update
messages, e.g. play queue) 2. Open browser's developer tools 3. Open
console tab in developer tools 4. REQ/RESP messages sent to/from LMS
will be logged here.
------------------------------------------------------------------------
cpd73's Profile: http://forums.slimdevices.com/member.php?userid=66686
View this thread: http://forums.slimdevices.com/showthread.php?t=115875
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.