URL safe characters?
cpd73 <cpd73.af4y3z-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
| Newsgroups | gmane.music.equipment.slimdevices.devel |
|---|---|
| Organization | Logitech Squeezebox Forums |
| Message-ID | <[email protected]> |
When using my MusicSimilarity DSTM mixer, I sometime see errors such
as:
Code:
--------------------
[22-01-31 21:05:58.4793] Slim::Formats::Playlists::M3U::write (277) Error: Couldn't retrieve objectForUrl: [file:///home/storage/Music/4%20Non%20Blondes%20-%20Bigger%2C%20Better%2C%20Faster%2C%20More%21/06%20Spaceman.mp3] - skipping!
--------------------
My DSTM mixer uses a python backend, which sends file:// URLs back to
LMS - the above being one such URL. (Note these URLs do play)
When I look in library.db I can't find that URL, but do find
"file:///home/storage/Music/4%20Non%20Blondes%20-%20Bigger,%20Better,%20Faster,%20More!/06%20Spaceman.mp3"
This seems to imply that LMS accepts commas and exclamation marks -
whereas Python is percent encoding them. Is there a canonical list of
"URL safe" characters (i.e. those that do not need to be percent
encoded) that LMS uses? If so I could update the Python code to match.
For now, calling
"Slim::Utils::Misc::fileURLFromPath(Slim::Utils::Misc::pathFromFileURL($path));"
(so convert Python file:// to plain path, then convert plain path to LMS
file://) seems to work-around the issue.
*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