Fixed updating the index when cutting a recording again

This commit is contained in:
Klaus Schmidinger
2025-06-19 13:35:32 +02:00
parent 09b95eeae2
commit 7b258fd5f6
3 changed files with 9 additions and 3 deletions

View File

@@ -3461,6 +3461,7 @@ Matthias Senzel <matthias.senzel@t-online.de>
for fixing an unnecessary double display of menu items in the Recordings menu
for reporting a bug in handling cSkinDisplayMenu::GetTextAreaFont()
for reporting characters being cut off while editing in the LCARS skin
for fixing updating the index when cutting a recording again
Marek Nazarko <mnazarko@gmail.com>
for translating OSD texts to the Polish language

View File

@@ -10119,7 +10119,7 @@ Video Disk Recorder Revision History
- Now deleting old recording info before reading modified info file (suggested by
Stefan Hofmann).
2025-06-18:
2025-06-19:
- Fixed some misplaced 'override' keywords in the 'hello' and 'skincurses' plugins.
- cRecording now fetches priority, lifetime and framesPerSecond from cRecordingInfo.
@@ -10132,3 +10132,4 @@ Video Disk Recorder Revision History
- Fixed strreplace() in case the search string is empty (thanks to Stefan Hofmann).
- Fixed automatic moving of the cursor when inputting characters with number keys (reported
by Stefan Hofmann).
- Fixed updating the index when cutting a recording again (thanks to Matthias Senzel).

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.c 5.41 2025/04/16 09:14:20 kls Exp $
* $Id: recording.c 5.42 2025/06/19 13:35:32 kls Exp $
*/
#include "recording.h"
@@ -1702,6 +1702,8 @@ void cRecordings::AddByName(const char *FileName, bool TriggerUpdate)
if (TriggerUpdate)
TouchUpdate();
}
else
UpdateByName(FileName);
}
void cRecordings::DelByName(const char *FileName)
@@ -1728,8 +1730,10 @@ void cRecordings::DelByName(const char *FileName)
void cRecordings::UpdateByName(const char *FileName)
{
if (cRecording *Recording = GetByName(FileName))
if (cRecording *Recording = GetByName(FileName)) {
Recording->numFrames = -1;
Recording->ReadInfo(true);
}
}
int cRecordings::TotalFileSizeMB(void) const