Documentation Talk:Building Lua Playlist Scripts

From VideoLAN Wiki
Jump to navigation Jump to search

It would be better to change function probe() to contain:

if string.find( vlc.path, "", 1, 1 )

instead of

if string.match( vlc.path, "" )

to avoid using regular expressions and use plain search/find instead. Also, if we decide to still use string.match() then the dot (".") must be encoded like ("%.") otherwise a lot of other false positives would match, too. For example "" would also match.