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

[Subtitles][Ass] Fix non-working ASS-Override setting #18794

Merged
merged 1 commit into from
Nov 16, 2020

Conversation

enen92
Copy link
Member

@enen92 enen92 commented Nov 15, 2020

Description

This setting "Override ASS/SSA subtitle fonts" is broken in Kodi 19 (doesn't do anything). The problem is that libass is configured with special:https://temp/fonts as the font folder (to where the demuxer extracts the subtitle files) but when a font is selected in Kodi it is usually in special:https://home/media/Fonts/. Since you can't append multiple folders to libass, If the user wants to use a system configured font, it has to be also copied to the temp folder before the lib is configured.

Motivation and Context

Fixes an issue reported in IRC

How Has This Been Tested?

With mkv's containing muxed ass subtitles. Also tested all the samples in the team ftp server.

Screenshots (if appropriate):

Configured settings:
alt text

Previous behaviour:
alt text

PR:
alt text

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

@enen92 enen92 added Type: Fix non-breaking change which fixes an issue v19 Matrix Component: Content labels Nov 15, 2020
@enen92 enen92 added this to the Matrix 19.0-beta 1 milestone Nov 15, 2020
Copy link
Contributor

@phunkyfish phunkyfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks good.

@enen92
Copy link
Member Author

enen92 commented Nov 15, 2020

Comments addressed @lrusak, thanks

xbmc/cores/VideoPlayer/DVDSubtitles/DVDSubtitlesLibass.cpp Outdated Show resolved Hide resolved
{
XFILE::CFile::Copy(fontPath, finalFontPath);
CLog::Log(LOGDEBUG, "CDVDSubtitlesLibass: Copied {} to {}", fontPath, finalFontPath);
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you return earlier here? Will the the second path exist if the first path does?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second folder (system one) is only used if the font being added can not be found in the media/fonts folder. It was implemented like this before as well.
As far as I can see, kodi will include arial and teletext by default in the system folder. You should be able to select those fonts and use the setting even if you have not added any fonts to your media folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Content Type: Fix non-breaking change which fixes an issue v19 Matrix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants