mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Now unlocking the Recordings list before displaying an error message in cMenuPathEdit::ApplyChanges() and cReplayControl::Stop()
This commit is contained in:
parent
28b6ee47e3
commit
a343b375df
@ -3297,6 +3297,8 @@ Matthias Senzel <matthias.senzel@t-online.de>
|
|||||||
prematurely" from "error" to "info"
|
prematurely" from "error" to "info"
|
||||||
for suggesting to allow opening a folder when selecting a folder for a recording or
|
for suggesting to allow opening a folder when selecting a folder for a recording or
|
||||||
timer, even if it doesn't contain any subfolders
|
timer, even if it doesn't contain any subfolders
|
||||||
|
for reporting a possible locking problem in cMenuPathEdit::ApplyChanges() when the
|
||||||
|
lock is held while the error message is displayed
|
||||||
|
|
||||||
Marek Nazarko <mnazarko@gmail.com>
|
Marek Nazarko <mnazarko@gmail.com>
|
||||||
for translating OSD texts to the Polish language
|
for translating OSD texts to the Polish language
|
||||||
|
4
HISTORY
4
HISTORY
@ -9162,7 +9162,7 @@ Video Disk Recorder Revision History
|
|||||||
a subdirectory.
|
a subdirectory.
|
||||||
- SVDRP peering can now be limited to the default SVDRP host (see MANUAL for details).
|
- SVDRP peering can now be limited to the default SVDRP host (see MANUAL for details).
|
||||||
|
|
||||||
2018-01-16: Version 2.3.9
|
2018-01-17: Version 2.3.9
|
||||||
|
|
||||||
- Updated the Italian OSD texts (thanks to Diego Pierotto).
|
- Updated the Italian OSD texts (thanks to Diego Pierotto).
|
||||||
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
||||||
@ -9243,3 +9243,5 @@ Video Disk Recorder Revision History
|
|||||||
- Moved any locking from cutter.c into recording.c, to avoid a problem with locking
|
- Moved any locking from cutter.c into recording.c, to avoid a problem with locking
|
||||||
the Recordings list (reported by Matthias Senzel).
|
the Recordings list (reported by Matthias Senzel).
|
||||||
- Now using the 'example' macro in vdr.5 (thanks to Chris Mayo).
|
- Now using the 'example' macro in vdr.5 (thanks to Chris Mayo).
|
||||||
|
- Now unlocking the Recordings list before displaying an error message in
|
||||||
|
cMenuPathEdit::ApplyChanges() and cReplayControl::Stop() (reported by Matthias Senzel).
|
||||||
|
18
menu.c
18
menu.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: menu.c 4.53 2017/12/15 13:27:20 kls Exp $
|
* $Id: menu.c 4.54 2018/01/17 10:21:29 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -2492,13 +2492,18 @@ eOSState cMenuPathEdit::ApplyChanges(void)
|
|||||||
}
|
}
|
||||||
if (NumRecordings > 1 && !Interface->Confirm(cString::sprintf(tr("Move entire folder containing %d recordings?"), NumRecordings)))
|
if (NumRecordings > 1 && !Interface->Confirm(cString::sprintf(tr("Move entire folder containing %d recordings?"), NumRecordings)))
|
||||||
return osContinue;
|
return osContinue;
|
||||||
|
bool Error = false;
|
||||||
|
{
|
||||||
LOCK_RECORDINGS_WRITE;
|
LOCK_RECORDINGS_WRITE;
|
||||||
Recordings->SetExplicitModify();
|
Recordings->SetExplicitModify();
|
||||||
if (!Recordings->MoveRecordings(path, NewPath)) {
|
Error = !Recordings->MoveRecordings(path, NewPath);
|
||||||
|
if (!Error)
|
||||||
|
Recordings->SetModified();
|
||||||
|
}
|
||||||
|
if (Error) {
|
||||||
Skins.Message(mtError, tr("Error while moving folder!"));
|
Skins.Message(mtError, tr("Error while moving folder!"));
|
||||||
return osContinue;
|
return osContinue;
|
||||||
}
|
}
|
||||||
Recordings->SetModified();
|
|
||||||
if (strcmp(folder, oldFolder))
|
if (strcmp(folder, oldFolder))
|
||||||
return osUserRecMoved;
|
return osUserRecMoved;
|
||||||
return osUserRecRenamed;
|
return osUserRecRenamed;
|
||||||
@ -5541,6 +5546,8 @@ void cReplayControl::Stop(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cDvbPlayerControl::Stop();
|
cDvbPlayerControl::Stop();
|
||||||
|
bool Error = false;
|
||||||
|
{
|
||||||
LOCK_RECORDINGS_WRITE;
|
LOCK_RECORDINGS_WRITE;
|
||||||
Recordings->SetExplicitModify();
|
Recordings->SetExplicitModify();
|
||||||
if (cRecording *Recording = Recordings->GetByName(fileName)) {
|
if (cRecording *Recording = Recordings->GetByName(fileName)) {
|
||||||
@ -5550,8 +5557,11 @@ void cReplayControl::Stop(void)
|
|||||||
Recordings->SetModified();
|
Recordings->SetModified();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Skins.Message(mtError, tr("Error while deleting recording!"));
|
Error = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (Error)
|
||||||
|
Skins.Message(mtError, tr("Error while deleting recording!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user