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

How to dynamically enable/disable milliseconds in the timeline? #834

Closed
maliayas opened this issue Jan 16, 2024 · 4 comments · Fixed by #836
Closed

How to dynamically enable/disable milliseconds in the timeline? #834

maliayas opened this issue Jan 16, 2024 · 4 comments · Fixed by #836

Comments

@maliayas
Copy link

time_precision=2 in uosc.conf works fine but I want to do this on the fly via a command, so that I can set keybinding for it or use in the menu.

I've searched the issues here but could not find a solution. script-message-to uosc set time_precision 4 is not related to this I assume, which doesn't work either.

Thanks in advance.

@christoph-heinrich
Copy link
Contributor

You can update the options set in uosc.conf at runtime.
E.g. set script-opts uosc-time_precision=4

@Sneakpeakcss
Copy link
Contributor

You can update the options set in uosc.conf at runtime. E.g. set script-opts uosc-time_precision=4

This kinda gets all wonky when destination_time is set to playtime-remaining and you change time_precision to a value that's different than the one set in uosc.conf:

1.mp4
2.mp4

Perhaps this is another case of this, or something similar ?

@christoph-heinrich
Copy link
Contributor

christoph-heinrich commented Jan 17, 2024

That's super weird, and I can reproduce it. wtf

Edit: found the problem, not sure how to solve yet. it's a problem with a cache hitting some false positives.

christoph-heinrich added a commit to christoph-heinrich/uosc that referenced this issue Jan 17, 2024
Caching the zero represenation sounds like a good idea, until the
precision gets changed and then e.g. 01:40:23.13 returns -00:00:00.0
because it has the same amount of characters, messing up our width
estimation and pseudo monospace thingy.

Clearing the cache on options change avoids such conflicts.

Fixes tomasklaen#834
@maliayas
Copy link
Author

You can update the options set in uosc.conf at runtime.
E.g. set script-opts uosc-time_precision=4

Perfect. I created a menu option as cycle-values script-opts uosc-time_precision=3 uosc-time_precision=0

tomasklaen pushed a commit that referenced this issue Jan 20, 2024
Caching the zero represenation sounds like a good idea, until the
precision gets changed and then e.g. 01:40:23.13 returns -00:00:00.0
because it has the same amount of characters, messing up our width
estimation and pseudo monospace thingy.

Clearing the cache on options change avoids such conflicts.

Fixes #834
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

Successfully merging a pull request may close this issue.

3 participants