Make the "Save dive data as subtitles" feature more configurable.

Previously, the subtitle generation was hardcoded, making it unsuitable
if you didn't want all of the displayed values. This has been replaced
by a format string that is configurable in the settings, using predefined
tags that are replaced with the values. The default value for this has
been set to (mostly) match the currently generated subtitle string. This
also provides a good starting point for users that want to modify the string.

Signed-off-by: Victor Arvidsson <victarv@gmail.com>
This commit is contained in:
Victor Arvidsson 2024-10-23 17:57:56 +02:00 committed by Michael Keller
parent 1a9b09682a
commit 6886c9ccf8
8 changed files with 535 additions and 15 deletions

View file

@ -15,6 +15,7 @@ void qPrefMedia::loadSync(bool doSync)
disk_extract_video_thumbnails(doSync);
disk_extract_video_thumbnails_position(doSync);
disk_ffmpeg_executable(doSync);
disk_subtitles_format_string(doSync);
disk_auto_recalculate_thumbnails(doSync);
disk_auto_recalculate_thumbnails(doSync);
}
@ -23,3 +24,4 @@ HANDLE_PREFERENCE_BOOL(Media, "auto_recalculate_thumbnails", auto_recalculate_th
HANDLE_PREFERENCE_BOOL(Media, "extract_video_thumbnails", extract_video_thumbnails);
HANDLE_PREFERENCE_INT(Media, "extract_video_thumbnails_position", extract_video_thumbnails_position);
HANDLE_PREFERENCE_TXT(Media, "ffmpeg_executable", ffmpeg_executable);
HANDLE_PREFERENCE_TXT(Media, "subtitles_format_string", subtitles_format_string);