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

Correctly handle unicode chapters #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pymkv/MKVFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ def command(self, output_path, subprocess=False):
command.extend(['--attach-file-once', attachment.file_path])

# chapters
if self._chapters_file is not None:
command.extend(['--chapter-charset UTF-8 --chapters', self._chapters_file])
if self._chapter_language is not None:
command.extend(['--chapter-language', self._chapter_language])
Comment on lines +221 to 224
Copy link
Owner

Choose a reason for hiding this comment

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

Instead of combining the --chapter-charset option here with the --chapters option, lets give the user more control by creating a new self._chapters_charset variable that is stored in the MKVFile object. It can be initialized to None when the object is created and have property methods similar to the chapter language property.

if self._chapters_file is not None:
command.extend(['--chapters', self._chapters_file])

# global tags
if self._global_tags_file is not None:
Expand Down