From 988923a471926b2e70dd82445836011694a2a0b8 Mon Sep 17 00:00:00 2001 From: Karl Dietz Date: Sat, 4 Aug 2012 20:52:17 +0200 Subject: [PATCH] use same query in Program.php and recordinginfo.cpp the old code only matched via the triple title/subtitle/description while the matching in libmythtv also uses programid etc Fixes #10375 --- modules/tv/classes/Program.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/tv/classes/Program.php b/modules/tv/classes/Program.php index 812547a3c..4fd55ee9c 100644 --- a/modules/tv/classes/Program.php +++ b/modules/tv/classes/Program.php @@ -581,10 +581,16 @@ public function rec_forget_old() { // forgotten, so we have to search for matching rows $sh = $db->query('SELECT * FROM oldrecorded - WHERE title=? AND subtitle=? AND description=? AND future = 0', + WHERE title = ? AND + ((programid = '' AND subtitle = ? + AND description = ?) OR + (programid <> '' AND programid = ?) OR + (findid <> 0 AND findid = ?))', $this->title, $this->subtitle, - $this->description); + $this->description, + $this->programid, + $this->findid); while ($row = $sh->fetch_assoc()) { $prog =& new Program($row); MythBackend::find()->sendCommand(array('FORGET_RECORDING', $prog->backend_row(), '0'));