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

Add secondary subtitles command #505

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

leiserfg
Copy link

No description provided.

@leiserfg
Copy link
Author

Implements #504

@hooke007
Copy link
Contributor

It think it should be optimized more. Both of two menus look the same.

@christoph-heinrich
Copy link
Contributor

Imo it would be best if subtitles and secondary subtitles use the same menu. The secondary subtitle could be selected while holding shift or something, but then we also need a way of visually differentiating between them.

@hooke007
Copy link
Contributor

shift was already binded, ALT would be better.

@tomasklaen
Copy link
Owner

Yes, it does make sense to make it part of the existing subtitles menu. It'll require the menu key events API change I've been planning for a while now.

We can use counter_1 and counter_2 icons to differentiate the two.

@gunir
Copy link

gunir commented Jun 12, 2023

Currently I'm using another icon with above patch to use secondary subtitle, but I think having dual subs is great because:

  • It helps language learning
  • It helps comparing 2 subttiles
  • It's just great to have

image

But I think 1 single icon with 2 subtitle menus is better, but we need to add another submenu inside the current subtitle menu to switch to secondary submenu:

image

@k1gen
Copy link

k1gen commented Mar 13, 2024

bump. I'm learning German, and dual subs is a great feature I'd love to have in uosc

@azizLIGHT
Copy link

Currently I'm using another icon with above patch to use secondary subtitle, but I think having dual subs is great because:

  • It helps language learning
  • It helps comparing 2 subttiles
  • It's just great to have

image

But I think 1 single icon with 2 subtitle menus is better, but we need to add another submenu inside the current subtitle menu to switch to secondary submenu:

image

How were you able to do this? I added the changed lines from this PR to scripts/uosc/main.lua:

bind_command('subtitles-2', create_select_tracklist_type_menu_opener(
	'Secondary Subtitles', 'sub', 'secondary-sid', 'script-binding uosc/load-subtitles'
))

and added subtitles-2 to script-opts/uosc.conf

controls=menu,gap,subtitles,subtitles-2,<has_many_audio>audio...

But my uosc menu fails to load all buttons after the primary subtitle button, indicating a failure

@azizLIGHT
Copy link

I figured out how to do it. As my in my previous comment, put into scripts/uosc/main.lua:

bind_command('secondary-subtitles', create_select_tracklist_type_menu_opener(
	t('Secondary Subtitles'), 'sub', 'secondary-sid', 'script-binding uosc/load-subtitles', 'script-binding uosc/download-subtitles'
))

But then put this in script-opts/uosc.conf:

controls=menu,gap,subtitles,command:subtitles:script-binding uosc/secondary-subtitles?Secondary Subtitles,<has_many_audio>audio,<has_many_video>video,<has_many_edition>editions,<stream>stream-quality,gap,space,<has_chapter>command:arrow_back_ios:no-osd add chapter -1?Previous Chapter,command:fast_rewind:seek -10?Rewind 10s,cycle:play_arrow:pause:no=pause/yes=play_arrow?Play/Pause,command:fast_forward:seek 10?Forward 10s,<has_chapter>chapters,<has_chapter>command:arrow_forward_ios:no-osd add chapter 1?Next Chapter,space,speed,space,shuffle,loop-playlist,loop-file,gap,prev,items,next,gap,fullscreen

The important part is command:subtitles:script-binding uosc/secondary-subtitles?Secondary Subtitles

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 this pull request may close these issues.

None yet

7 participants