Double percent-encoding required for paths
Hello!
I use libTVVLCKit.a (the commit hash is 62dfbc38) in my tvOS app to play movies from SMB.
I have the issue with playback of files that have whitespace or Cyrillic characters in their paths.
To play such files I have to percent-encode their path strings twice.
Suppose l want to play the movie at the path smb://192.168.0.3/Video/Test video.mp4
I have to do the following steps
path = [path stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; //smb://192.168.0.3/Video/Test%20video.mp4
path = [path stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; //smb://192.168.0.3/Video/Test%2520video.mp4
NSURL *mediaURL = [NSURL URLWithString:path];
VLCMedia *media = [VLCMedia mediaWithURL:mediaURL];````
Otherwise, I can’t play it.
In the previous version of libTVVLCKit.a that I used (the commit hash was 94c2b3ce) the second call of the method stringByAddingPercentEscapesUsingEncoding: was not required.
Is this a bug or am I doing something wrong?
Please help me. Thanks in advance.