chitraanshpopli/create-vlc-playlist

Possible fix for percent and hash mark errors

Opened this issue · 0 comments

I've only tested this with files that have '#' in them, but not with files where '#' is the first character, but, I changed edit_paths, to also percent encode the '#' character, and it worked:

def edit_paths(self, video_files):
    for index in range(len(video_files)):
      video_files[index] =( 
      'file:///' + os.path.join(video_files[index])).replace('\\','/').replace('#', '%23')
  return video_files

It might be possible that you could also do a replace('%', '%25') (though, it would need to be prior to percent-encoding the '#'.

I would do a pull request, but I didn't do extensive testing, so thought dropping a hint might be more useful.