2011-11-29, 10:22
jimk72 Wrote:Quick question: When I was parsing the playlist files and extracting items and sending them to xbmc through json it does not work when I send local files?
example:
smb://FREENAS/Music/AC_DC/AC_DC Live/Thunderstruck.mp3
adds to playlist fine but local files from a m3u file do not?
H:\Music\3 Doors Down\When You're Young\When You're Young.mp3
gives an error about incorrect params?
These are both from the same m3u file.
Just figured out I can get the files from a playlist through json and local files are as follows:
H:\\Music\\3 Doors Down\\When You're Young\\When You're Young.mp3
is this the format I need to send to add local files to playlist?
The double backslash is needed in JSON because a backslash is an escape character (e.g. to escape double-quotes (") within a string) so you have to escape the backslash with another backslash. If you don't do that the JSON parser tries to interprete \M, \3 and \W (in the specific case of the path you posted) as special characters which will end up with an invalid path.