From b8ccac2815f37003a7aa8301104067887feb4b34 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 18 Apr 2025 09:48:11 +0200 Subject: [PATCH] Enabled manually turning subtitles on/off in 'after rewind' mode --- HISTORY | 3 ++- MANUAL | 5 ++++- device.c | 7 +++---- menu.c | 9 ++++++--- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/HISTORY b/HISTORY index 3d083dc3..f6fe16a5 100644 --- a/HISTORY +++ b/HISTORY @@ -10119,7 +10119,7 @@ Video Disk Recorder Revision History - Now deleting old recording info before reading modified info file (suggested by Stefan Hofmann). -2025-04-16: +2025-04-18: - Fixed some misplaced 'override' keywords in the 'hello' and 'skincurses' plugins. - cRecording now fetches priority, lifetime and framesPerSecond from cRecordingInfo. @@ -10127,3 +10127,4 @@ Video Disk Recorder Revision History - Now forcing re-reading the info file of an ongoing recording (reported by Christoph Haubrich). - Updated the Italian OSD texts (thanks to Diego Pierotto). +- Enabled manually turning subtitles on/off in 'after rewind' mode. diff --git a/MANUAL b/MANUAL index a64c048f..b03a4dee 100644 --- a/MANUAL +++ b/MANUAL @@ -954,7 +954,10 @@ VDR version 2.6.6 added '/' to this list. switching to a channel or playing a recording that provides subtitles. 'after rewind' turns on subtitles after a fast rewind during replay, and off again when the point where the - rewind was started is reached. + rewind was started is reached. In 'after rewind' mode you + can manually turn on subtitles by opening the Subtitles menu + and pressing Ok. If you later switch back to "No subtitles" + VDR will automatically go into 'after rewind' mode again. Subtitle languages = 0 Some tv stations broadcast various subtitle tracks in different languages. This option allows you to define which language(s) diff --git a/device.c b/device.c index 9e7f51e9..a914fbd1 100644 --- a/device.c +++ b/device.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 5.16 2025/03/28 22:49:17 kls Exp $ + * $Id: device.c 5.17 2025/04/18 09:48:11 kls Exp $ */ #include "device.h" @@ -1188,9 +1188,8 @@ bool cDevice::SetCurrentSubtitleTrack(eTrackType Type, bool Manual) if (Type == ttNone || IS_SUBTITLE_TRACK(Type)) { currentSubtitleTrack = Type; autoSelectPreferredSubtitleLanguage = !Manual; - if (dvbSubtitleConverter) - dvbSubtitleConverter->Reset(); if (dvbSubtitleConverter) { + dvbSubtitleConverter->Reset(); if (Type == ttNone) { if (Replaying() && !Transferring() && Setup.DisplaySubtitles == SUBTITLES_REWIND) dvbSubtitleConverter->SetVisible(false); @@ -1199,7 +1198,7 @@ bool cDevice::SetCurrentSubtitleTrack(eTrackType Type, bool Manual) DELETENULL(dvbSubtitleConverter); } } - else if (Replaying() && !Transferring() && Setup.DisplaySubtitles == SUBTITLES_REWIND) + else if (Replaying() && !Transferring() && Setup.DisplaySubtitles == SUBTITLES_REWIND && Manual) dvbSubtitleConverter->SetVisible(true); } DELETENULL(liveSubtitle); diff --git a/menu.c b/menu.c index 414d8390..66d691ab 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 5.26 2025/03/28 22:49:17 kls Exp $ + * $Id: menu.c 5.27 2025/04/18 09:48:11 kls Exp $ */ #include "menu.h" @@ -5305,8 +5305,7 @@ eOSState cDisplaySubtitleTracks::ProcessKey(eKeys Key) timeout.Set(TRACKTIMEOUT); break; case kOk: - if (types[track] != cDevice::PrimaryDevice()->GetCurrentSubtitleTrack()) - oldTrack = -1; // make sure we explicitly switch to that track + oldTrack = -1; // make sure we explicitly switch to that track timeout.Set(); break; case kNone: break; @@ -5316,6 +5315,10 @@ eOSState cDisplaySubtitleTracks::ProcessKey(eKeys Key) if (track != oldTrack) { Show(); cDevice::PrimaryDevice()->SetCurrentSubtitleTrack(types[track], true); + if (track == ttNone && Setup.DisplaySubtitles == SUBTITLES_REWIND) { + cDevice::PrimaryDevice()->SetCurrentSubtitleTrack(types[track], false); + cDevice::PrimaryDevice()->EnsureSubtitleTrack(); + } } return timeout.TimedOut() ? osEnd : osContinue; }