occivink / mpv-gallery-view

Gallery-view scripts for mpv
The Unlicense
189 stars 20 forks source link

add option to create thumbs_dir #34

Closed N-R-K closed 2 years ago

N-R-K commented 2 years ago

disabled by default. this will allow users who are using ramdisk as thumbs_dir to not have to manually create that directory after every reboot.

i had this hardcoded for myself for a good while, but i don't see why this shouldn't be upstreamed.

N-R-K commented 2 years ago

@occivink Hi, have you forgotten about/not noticed this PR or simply don't like it? If it's the latter then I can close it.

occivink commented 2 years ago

Hello, I think the part about the ramdisk makes sense. I had originally not done this because there's no easy cross-platform way to do it as far as I could tell (even if I don't use windows myself, it doesn't hurt to keep compatibility), but maybe mkdir is compatible enough. Could you replace the os.execute calls with utils.subprocess? That way there is no issue with escaping of special characters.

N-R-K commented 2 years ago

Hi, I did have windows compatibility in mind even though I don't use it myself either. Afaik windows also has mkdir and so it should work, though I'm unsure weather it has the -p flag or not so I left that out.

occivink commented 2 years ago

Thanks, and sorry for the delay