Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling chapter text in seek bar. #13

Open
dr-baba opened this issue Jun 4, 2022 · 6 comments
Open

Disabling chapter text in seek bar. #13

dr-baba opened this issue Jun 4, 2022 · 6 comments

Comments

@dr-baba
Copy link

dr-baba commented Jun 4, 2022

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
Copy link
Owner

Zren commented Jun 5, 2022

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
Copy link
Author

dr-baba commented Jun 5, 2022

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
Copy link
Owner

Zren commented Jun 5, 2022

... 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
Copy link
Author

dr-baba commented Jun 6, 2022

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
Copy link
Owner

Zren commented Jun 6, 2022

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
Copy link
Author

dr-baba commented Jun 10, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants