Video-hub-app: Thumbnails don't show up if the path to the vha file has a space in it

Created on 23 Jan 2019  ยท  8Comments  ยท  Source: whyboris/Video-Hub-App

Thumbnails also don't show up if:

  • [ ] The path to the vha file has a space in it!

Reopening this issue as it's shown up again! ๐Ÿ‘

With mac, this is fixed with encodeURI(), but it seems (?) Windows can't handle %20 in file names?

Maybe surrounding the path with quotes could help... investigation needed! ๐Ÿ”

2.0.0 bug investigation needed regression

All 8 comments

Since I have both a Windows and a Mac machine I'll look into it ๐Ÿ‘

I'll look into it sometime this week and hopefully solve it without resorting to a hack: filling in the space character in the hub name with a - :trollface:

I identified a second issue which might be easy to fix at the same time - (silly) Windows treats the file string funny, and takes the \ to mean an escape code! ๐Ÿ˜ข

This means that a path like D:\Files\... is taken as D: iles\...
(\f being form feed https://en.wikipedia.org/wiki/Page_break)

Encoding the string, or escaping everything should fix both issues! ๐Ÿ‘

I'll look into it sometime this week and hopefully solve it without resorting to a hack: filling in the space character in the hub name with a - :trollface:

This won't work, unless you plan on replacing all spaces in the entire path to the file as well... - :trollface:

Damn, this issue is going to be trickier than I thought - it also includes using a vha file created on one system, on another system... ๐Ÿ˜ข

Linux/Mac using / as a path delimiter, but Windows uses \ - This means if you create on one, but then load on another, the saved paths aren't going to match path.sep! ๐Ÿ‘Ž

Looking at this, it seems the best option would be to convert Windows \ to / (it's used in the urls anyway), and then we can always assume folders are separated by / - I think this should work for opening files too.

Only problem is any libraries created on Windows will need to be rescanned - thumbnails should be safe! ๐Ÿ‘

Are you okay with this?

I think I understand your description of the solution you describe. Could you just clarify what you mean by:

Only problem is any libraries created on Windows will need to be rescanned - thumbnails should be safe!

Meaning that after this change, any .vha file you create on Windows will work fine, but any old .vha file will not?

If so -- no problem at all -- version 2.0 is _all-breaking-changes_ (vha files, settings, etc - as if it's a separate app from before) ๐Ÿ™†โ€โ™‚๏ธ

I was referring to .vha files created using a recent git master (most likely just you and I), should work with a simple meta regen! ๐Ÿ˜„ Old files won't work anyway - thoughts on #168?

Thanks @cal2195 for diagnosing the problem and recommending a solution ๐Ÿ™‡

PR #203 should fix things up ๐Ÿ˜Ž

Was this page helpful?
0 / 5 - 0 ratings