From 68739fd72beb9745b3e47b9e466311ef23a8ca97 Mon Sep 17 00:00:00 2001 From: Timo Eskola Date: Tue, 2 Oct 2018 11:02:10 +0300 Subject: Fixed header row when after deleting or hiding recordings. --- HISTORY | 3 +++ duplicates.c | 2 +- recording.c | 8 ++++++++ recording.h | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index 6487ba0..ff9a060 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,9 @@ VDR Plugin 'duplicates' Revision History ---------------------------------------- +2018-10-02: Version 1.0.1 +- Fixed header row when after deleting or hiding recordings. + 2018-09-07: Version 1.0.0 - Dropped support for VDR 2.2.0. - Added scanner thread for duplicates. diff --git a/duplicates.c b/duplicates.c index 7ffbeff..3b62b82 100644 --- a/duplicates.c +++ b/duplicates.c @@ -12,7 +12,7 @@ #include "menu.h" #include "recording.h" -static const char *VERSION = "1.0.0"; +static const char *VERSION = "1.0.1"; static const char *DESCRIPTION = trNOOP("Shows duplicate recordings"); static const char *MAINMENUENTRY = trNOOP("Duplicate recordings"); diff --git a/recording.c b/recording.c index 0217b1e..887c879 100644 --- a/recording.c +++ b/recording.c @@ -66,6 +66,14 @@ cDuplicateRecording::~cDuplicateRecording() { delete duplicates; } +bool cDuplicateRecording::HasDescription(void) const { + if (!description.empty()) + return true; + else if (duplicates && duplicates->First()) + return duplicates->First()->HasDescription(); + return false; +} + bool cDuplicateRecording::IsDuplicate(cDuplicateRecording *DuplicateRecording) { if (!HasDescription() || !DuplicateRecording->HasDescription()) return false; diff --git a/recording.h b/recording.h index 18a666f..e473cd5 100644 --- a/recording.h +++ b/recording.h @@ -29,7 +29,7 @@ public: cDuplicateRecording(const cRecording *Recording); cDuplicateRecording(const cDuplicateRecording &DuplicateRecording); ~cDuplicateRecording(); - bool HasDescription(void) const { return ! description.empty(); } + bool HasDescription(void) const; bool IsDuplicate(cDuplicateRecording *DuplicateRecording); void SetChecked(bool chkd = true) { checked = chkd; } bool Checked() { return checked; } -- cgit v1.2.3