diff options
author | Timo Eskola <timo@tolleri.net> | 2018-09-02 14:22:53 +0300 |
---|---|---|
committer | Timo Eskola <timo@tolleri.net> | 2018-09-02 14:22:53 +0300 |
commit | c15444b2020a155f4101fc6b8e225cb317892423 (patch) | |
tree | d31c4725361d63f68ab3947b794a712de8987207 | |
parent | e12245cacc509ca76a9e2192a3c9c42be0a52861 (diff) | |
download | vdr-plugin-duplicates-c15444b2020a155f4101fc6b8e225cb317892423.tar.gz vdr-plugin-duplicates-c15444b2020a155f4101fc6b8e225cb317892423.tar.bz2 |
Improved logging.
-rw-r--r-- | menu.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -148,6 +148,7 @@ void cMenuDuplicates::SetHelpKeys(void) { void cMenuDuplicates::Set(bool Refresh) { if (DuplicateRecordings.Lock(duplicateRecordingsStateKey)) { + dsyslog("duplicates: %s menu.", Refresh ? "Refreshing" : "Creating"); const char *CurrentRecording = NULL; int currentIndex = -1; if (Refresh) @@ -267,15 +268,14 @@ void cMenuDuplicates::Del(int index) { eOSState cMenuDuplicates::Delete(void) { if (HasSubMenu() || Count() == 0) return osContinue; - cMenuDuplicateItem *ri = (cMenuDuplicateItem *)Get(Current()); - if (ri) { + if (cMenuDuplicateItem *ri = (cMenuDuplicateItem *)Get(Current())) { + const char *FileName = ri->FileName(); if (Interface->Confirm(trVDR("Delete recording?"))) { - if (TimerStillRecording(ri->FileName())) + if (TimerStillRecording(FileName)) return osContinue; - cString FileName; { LOCK_RECORDINGS_READ - if (const cRecording *Recording = Recordings->GetByName(ri->FileName())) { + if (const cRecording *Recording = Recordings->GetByName(FileName)) { FileName = Recording->FileName(); if (RecordingsHandler.GetUsage(FileName)) { if (!Interface->Confirm(trVDR("Recording is being edited - really delete?"))) @@ -283,6 +283,7 @@ eOSState cMenuDuplicates::Delete(void) { } } } + dsyslog("duplicates: Deleting recording %s.", FileName); RecordingsHandler.Del(FileName); // must do this w/o holding a lock, because the cleanup section in cDirCopier::Action() might request one! if (cReplayControl::NowReplaying() && strcmp(cReplayControl::NowReplaying(), FileName) == 0) cControl::Shutdown(); |