po5 / thumbfast

High-performance on-the-fly thumbnailer script for mpv
Mozilla Public License 2.0
758 stars 34 forks source link

osc.lua often does not appear. #80

Closed utilop closed 1 year ago

utilop commented 1 year ago

I use thumbfast with osc.lua, often when opening a file in explorer (windows 11) the control interface does not appear.

christoph-heinrich commented 1 year ago

If you open the console, do you see an error when the interface doesn't appear?

utilop commented 1 year ago

@christoph-heinrich Until I could reproduce it again: D But it seems that he does not write anything. I'll write later if possible

utilop commented 1 year ago

@christoph-heinrich Nothing, absolutely изображение

BhaturaGuy commented 1 year ago

I second this, I use osc.lua on my laptop and sometimes (6/10) it does not display thumbnails and any error.

GunGunGun commented 1 year ago

I third this, same issue, sometimes the seek bar just disappear completely. Attached log file + pic: https://i.imgur.com/UUC73DT.png

And it's wierd that this bugs happen even without thumbfast, only osc.lua.

patchedoscwithoutthumbfast.log

po5 commented 1 year ago

I am finally able to reproduce this, and at first glance it doesn't make any sense:

After a lot of thinking and fiddling, I have found the cause. It's a collision between the builtin and patched OSC's input sections. A script can call mp.disable_key_bindings() when the other doesn't expect it, and everything breaks. Prefixing every input section name with thumbfast-osc- works flawlessly. I've also updated values that will be fed to mp.set_mouse_area as a section name.

Issue can be reliably reproduced with the following script, if you want to see it for yourself:

mp.add_forced_key_binding("d", "dssddsds", function()
    mp.disable_key_bindings("input")
    mp.disable_key_bindings("window-controls")
    mp.disable_key_bindings("showhide")
    mp.disable_key_bindings("showhide_wc")
end)

This is an issue on every osc.lua fork as far as I can tell, no one had figured it out until now. Probably because you can set osc=no in config and forget about the issue :^)

GunGunGun commented 1 year ago

Thank you for your hard work, what a great find because I honestly love the osc.lua so much but couldn't really use it before :D