-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix second ASS Subtitle keep its own style, #4433 #5132
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
Conversation
This commit will: - Add a new IINA setting secondarySubOverrideLevel to Preferences - Add a "no" enum constant to Preferences.SubOverrideLevel - Add a preference.sub_override_level.no key to base and English Localizable.strings - Change PrefSubViewController.ASSOverrideLevelTransformer and PrefSubViewController.ASSOverrideLevelValueTransformer to support the new "no" enum constant - Remove support from ignoreAssStyles from MPVController.mpvInit - Add support for secondarySubOverrideLevel to MPVController.mpvInit These are the backend changes needed to support changing the IINA settings Subtitle tab to include a control for setting the secondary subtitle override level. The user interface changes still need to be done. These changes will also fix: Sub ass style overrides always applied, #4927.
@uiryuu I did not include a UI change as I was worred you had already started on the UI changes and including it might cause merge conflicts for you. The change is minor. I added 32 to the width of the slider to allow for the addition of the PrefSubViewController.xib changes:
One of the contributing factors to IINA's confusion over the sub-ass-override option has to do with the
Trouble is IINA does not provide controls for any of the
We probably should add support for some of these so that the |
I've finished setting up the UI. Feel free to give suggestions
Let's make them in beta 2, at least not in this PR. |
fabe773
to
267a891
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub won't let me request changes because I'm one of the authors. See my comments on the descriptions and changes needed.
I did a bunch of testing and the IINA code looks good, but I think mpv is broken in that force
and strip
are not applying sub-ass*
as they should per the doc. I think we ignore than and proceed. I will report it to mpv when I get a chance.
iina/Base.lproj/Localizable.strings
Outdated
@@ -167,6 +167,12 @@ | |||
"preference.sub_override_level.strip" = "strip"; | |||
"preference.sub_override_level.yes" = "yes"; | |||
|
|||
"preference.sub_override_level.descriptive_text.no" = "No override: render subtitles as specified by the subtitle scripts."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The No override
prefix is inconsistent with the other descriptions. For this one I would use the exact description from the mpv manual:
Render subtitles as specified by the subtitle scripts, without overrides.
iina/Base.lproj/Localizable.strings
Outdated
@@ -167,6 +167,12 @@ | |||
"preference.sub_override_level.strip" = "strip"; | |||
"preference.sub_override_level.yes" = "yes"; | |||
|
|||
"preference.sub_override_level.descriptive_text.no" = "No override: render subtitles as specified by the subtitle scripts."; | |||
"preference.sub_override_level.descriptive_text.force" = "Only allow override using the --sub-ass-* mpv options."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not what force
does. This sounds more like what yes
does. Maybe something like:
Apply all subtitle styles.
iina/Base.lproj/Localizable.strings
Outdated
@@ -167,6 +167,12 @@ | |||
"preference.sub_override_level.strip" = "strip"; | |||
"preference.sub_override_level.yes" = "yes"; | |||
|
|||
"preference.sub_override_level.descriptive_text.no" = "No override: render subtitles as specified by the subtitle scripts."; | |||
"preference.sub_override_level.descriptive_text.force" = "Only allow override using the --sub-ass-* mpv options."; | |||
"preference.sub_override_level.descriptive_text.scale" = "Allow adjusting scale of ASS subtitles and override using the --sub-ass-* mpv options."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is desirable to keep IINA high level and avoid explicitly mentioning mpv options if we can. This description should build on the description for yes
. See my comment below on yes
. Maybe something like:
Apply the scale setting in addition to the style settings in this section.
Unfortunately since we only support setting the scale on the quick setting panel this might be a little confusing to users. We may want to add scale support in settings to make this easier for a user to grasp and allow users to be able to change the scale in a way that persists.
iina/Base.lproj/Localizable.strings
Outdated
"preference.sub_override_level.descriptive_text.no" = "No override: render subtitles as specified by the subtitle scripts."; | ||
"preference.sub_override_level.descriptive_text.force" = "Only allow override using the --sub-ass-* mpv options."; | ||
"preference.sub_override_level.descriptive_text.scale" = "Allow adjusting scale of ASS subtitles and override using the --sub-ass-* mpv options."; | ||
"preference.sub_override_level.descriptive_text.strip" = "Allow adjusting scale and style of ASS subtitles."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not what strip
does. For strip
I would use the mpv manual text:
Radically strip all ASS tags and styles from the subtitle.
Changes look good to me. |
This commit will:
secondarySubOverrideLevel
toPreferences
no
enum constant toPreferences.SubOverrideLevel
preference.sub_override_level.no
key to base and EnglishLocalizable.strings
PrefSubViewController.ASSOverrideLevelTransformer
andPrefSubViewController.ASSOverrideLevelValueTransformer
to support the newno
enum constantignoreAssStyles
fromMPVController.mpvInit
secondarySubOverrideLevel
toMPVController.mpvInit
Ignore ASS styles
checkbox from theASS Subtitles
section on theSubtitle
tab of IINA's settingsno
setting to the slider, replacing the checkboxASS Subtitles
section to allow the slider to work for both the primary subtitles and secondary subtitlesThese changes will also fix:
Sub ass style overrides always applied, #4927.
Description: