occivink / mpv-gallery-view

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

Dynamic thumbnail sizes via input.conf #24

Closed Waiifu closed 3 years ago

Waiifu commented 3 years ago

Hey!

I have a 4K TV I use playlist view on, and I've realized if I'm going through certain folders, if the images I happen to browse are more vertical/horizontal at times, or for some reason I want to see each picture larger/smaller to browse through them faster, it comes in handy to be able to swap between thumbnail sizes on the fly.

occivink commented 3 years ago

Hi, and thanks for the pull request. I recently implemented dynamic options with the script-opts options of mpv. For your example, you can now bind

[key] no-osd change-list script-opts append "playlist_view-gallery_size=(ww * wh <= 1921 * 1081) and {603, 339} or {952, 536}"

To change multiple options at the same time, you can simply use multiple commands with ; (which is a little verbose I have to admit). It should be possible to modify any of the script options like such.