FireFly Media Server (formerly mt-daapd) › Firefly Media Server Forums › Firefly Media Server › Nightlies Feedback › filenames with question marks are not scanned, patch to fix! › Reply To: filenames with question marks are not scanned, patch to fix!
Ok, more light on the subject..
io_open is pass the location: file:///MP3s/The+Smiths/Hatful+Of+Hollow/The+Smiths+-+How+Soon+Is+Now%3f.mp3
1) Split the location into protocol and path
2) URL decode the path
path_part=/MP3s/The Smiths/Hatful Of Hollow/The Smiths – How Soon Is Now?.mp3
3) Split the path at ? for options
path_part=MP3s/The Smiths/Hatful Of Hollow/The Smiths – How Soon Is Now
I don’t believe this to be correct
Take this URL for example
The %3f is not decoded THEN interpreted as a option seperated. The ? must be searched for prior to URL decoding
Url decoding can then be carried out AFTER the ? has been located..
needs to happen AFTER the option_part have been defined and on option_part and path_part independently
This way an encoded ? as %3f will not be incorrectly parsed as an option.
I’ll write a patch after I’ve tested this theory out!