VLC doesn’t tell user about error in M3U playlist
OS: Windows 10 (presumably occurs in other environments as well) VLC version: current version 3.0.7.1 and earlier on Windows
Example of problem: When VLC encounters this line in an M3U playlist ..\Fleetwood Mac\Tusk\05 Sara [Edit].wma VLC decides this is not a properly-formed URL (an issue which I am not arguing), and then just throws it out without giving the user any explanation at all. VLC continues processing the remaining lines in the file, but pretends this one media specification never existed.
Impact of problem: When a user gives VLC an M3U file with a 100 media items and VLC pretends there are only 95, the user wastes a lot of time figuring out what went wrong. First he has to figure out how many are missing (VLC doesn’t say how many items in the playlist were imported, so he has to count them in the display). Then he has to figure out which ones are missing by visually comparing his M3U file to the playlist display. Then comes the really hard part – why did VLC ignore this item? And the user is off scrounging through hard to find documentation and scouring forums and posting problems. Why can’t VLC just share its info with the user in the first place: what user text caused the problem and what is the problem?
Location of problem code: The problem is in the /Demux/Playlist/M3U.c module, in the ReadDir function, at line 301 which is “goto error;”. The code has looked at the return value from ProcessMRL and decided that the user’s text does not represent a URL/MRL. So it simply ignores the user’s specification and goes to an error block of code without informing the user.
What should be done: Before the “goto error;” statement there should be a block of code that somehow tells the user what segment of text was deemed to be “wrong” or “unprocessable” and why. The display to the user should be in a format that it stays visible, or is easily retrievable, and doesn’t just flash on the screen and disappear. The user’s text should be displayed in the correct sequence in the playlist with an error flag/message attached. This could be similar to how a reference to a non-existent file is shown in the playlist, but with an error message attached.
More implementation details: the error block of code at line 323 in the ReadDir function is branched to from 4 different locations, each of which detects a separate problem. I haven’t looked closely at the other 3 locations besides line 301, but I assume these are 4 separate error conditions, each deserving its own informative message to the user.