1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed moving editing marks, so that they don't get overwritten with old values through an update of the marks file

This commit is contained in:
Klaus Schmidinger 2013-02-11 11:27:34 +01:00
parent d8ba7158bc
commit d2ef44f8f5
5 changed files with 23 additions and 14 deletions

View File

@ -7585,10 +7585,12 @@ Video Disk Recorder Revision History
- Fixed formatting and removed some superfluous break statements in vdr.c's command
line option switch.
2013-02-10: Version 1.7.38
2013-02-11: Version 1.7.38
- Updated the Ukrainian OSD texts (thanks to Yarema Aka Knedlyk).
- Updated the Estonian OSD texts (thanks to Arthur Konovalov).
- Updated the Romanian OSD texts (thanks to Lucian Muresan).
- Updated the French OSD texts (thanks to Marc Perrudin).
- Updated the Macedonian OSD texts (thanks to Dimitar Petrovski).
- Fixed moving editing marks, so that they don't get overwritten with old values
through an update of the marks file.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.h 2.65 2013/02/09 15:09:22 kls Exp $
* $Id: config.h 2.66 2013/02/11 11:27:34 kls Exp $
*/
#ifndef __CONFIG_H
@ -27,8 +27,8 @@
// The plugin API's version number:
#define APIVERSION "1.7.37"
#define APIVERSNUM 10737 // Version * 10000 + Major * 100 + Minor
#define APIVERSION "1.7.38"
#define APIVERSNUM 10738 // Version * 10000 + Major * 100 + Minor
// When loading plugins, VDR searches them by their APIVERSION, which
// may be smaller than VDRVERSION in case there have been no changes to

13
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.c 2.76 2013/02/02 14:00:39 kls Exp $
* $Id: menu.c 2.77 2013/02/11 11:08:54 kls Exp $
*/
#include "menu.h"
@ -4763,9 +4763,8 @@ void cReplayControl::MarkToggle(void)
{
int Current, Total;
if (GetIndex(Current, Total, true)) {
cMark *m = marks.Get(Current);
lastCurrent = -1; // triggers redisplay
if (m)
if (cMark *m = marks.Get(Current))
marks.Del(m);
else {
marks.Add(Current);
@ -4784,8 +4783,7 @@ void cReplayControl::MarkJump(bool Forward)
int Current, Total;
if (GetIndex(Current, Total)) {
if (marks.Count()) {
cMark *m = Forward ? marks.GetNext(Current) : marks.GetPrev(Current);
if (m) {
if (cMark *m = Forward ? marks.GetNext(Current) : marks.GetPrev(Current)) {
Goto(m->Position(), true);
displayFrames = true;
return;
@ -4801,8 +4799,7 @@ void cReplayControl::MarkMove(bool Forward)
{
int Current, Total;
if (GetIndex(Current, Total)) {
cMark *m = marks.Get(Current);
if (m) {
if (cMark *m = marks.Get(Current)) {
displayFrames = true;
int p = SkipFrames(Forward ? 1 : -1);
cMark *m2;
@ -4878,7 +4875,7 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
{
if (!Active())
return osEnd;
if (Key == kNone)
if (Key == kNone && !marksModified)
marks.Update();
if (visible) {
if (timeoutShow && time(NULL) > timeoutShow) {

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 2.86 2013/02/08 09:02:07 kls Exp $
* $Id: recording.c 2.87 2013/02/11 11:18:22 kls Exp $
*/
#include "recording.h"
@ -1506,6 +1506,15 @@ bool cMarks::Update(void)
return false;
}
bool cMarks::Save(void)
{
if (cConfig<cMark>::Save()) {
lastFileTime = LastModifiedTime(fileName);
return true;
}
return false;
}
void cMarks::Align(void)
{
cIndexFile IndexFile(recordingFileName, false, isPesRecording);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.h 2.42 2013/02/07 13:42:17 kls Exp $
* $Id: recording.h 2.43 2013/02/11 11:18:13 kls Exp $
*/
#ifndef __RECORDING_H
@ -234,6 +234,7 @@ private:
public:
bool Load(const char *RecordingFileName, double FramesPerSecond = DEFAULTFRAMESPERSECOND, bool IsPesRecording = false);
bool Update(void);
bool Save(void);
void Align(void);
void Sort(void);
void Add(int Position);