Zren / mpv-osc-tethys

An OSC UI replacement for MPV with icons from the bomi video player. Also contains thumbnail preview and a picture-in-picture button.
187 stars 13 forks source link

Disabling chapter text in seek bar. #13

Open dr-baba opened 2 years ago

dr-baba commented 2 years ago

Hi, I am trying to get rid of the seek bar chapter text so that only the time is displayed when I seek.

From what I could seechapter_fmt=no to disable this. image

Here is my osc.conf:

image

However the chapter text is still there on the seek bar.

image

What am I missing/doing wrong?

Zren commented 2 years ago

I don't use many of the osc.lua config options (notice there's no Chapter: text in the tooltip). I'll add a toggle for that now.

Hmmm. showSeekbarChapter... might make the user assume it'll hide the chapter indicators too. showChapterTooltip might be a better name.

dr-baba commented 2 years ago

Thanks that works.

Another thing I'm trying to achieve is to show the osc when seeking etc like using the wheel or arrow keys. I found this and it works but it pops up the default osc when seeking. How can I point it to osc_tethys, I tried as below but doesn't seem to work. Can that be enabled?

for key, loader in pairs(package.loaders) do
    res = loader('@osc_tethys.lua')
    print('res value', '"', res, '"', type(res))
    if type(res) == 'function' then
        print('found', res, res('@osc_tethys.lua'))
        break
    end
end

function seek_handler()
    show_osc()
end
mp.register_event("seek", seek_handler)
Zren commented 2 years ago

... I don't know. Is it loading a 2nd instance of the osc to draw it? osc_tethys.lua has show_osc() so that should work. Check the errors in the console (~ Key).

dr-baba commented 2 years ago

When I have it using osc.lua, it loads the default osc while the tethys osc is still there. The tethys osc was loaded because I moved my mouse. image

Here is the console error when referencing osc_tethys.lua in the script. image

Here is the script for reference: image

Zren commented 2 years ago

ocs_on_seek.lua comes before ocs_tethys.lua alphabetically. Perhaps it's because it hasn't loaded tethys yet? Try renaming the file to start with z? If that doesn't work, then maybe put the for loop inside seek_handler()?

local tethysImported = false
function seek_handler()
    if not tethysImported then
        for ...
        end
        tethysImported = true
    end
    show_ocs()
end
dr-baba commented 2 years ago

I have tried both but and it's the same error. I'll just park it for now, thanks for you help.