From: E.Smith <31170571+azlm8t@users.noreply.github.com> Date: Fri, 16 Nov 2018 09:17:53 +0000 (+0000) Subject: dvr: Fix season/episode unique test when recording. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aee5f768a44174371f5a7012397bb664addedd31;p=thirdparty%2Ftvheadend.git dvr: Fix season/episode unique test when recording. The test for season/episode numbers the same has become broken during the changeover of types from string to int. So it was only checking episode numbers, meaning that S02E01 would not record if S01E01 was available. --- diff --git a/src/dvr/dvr_db.c b/src/dvr/dvr_db.c index 35242d6ee..169d5b940 100644 --- a/src/dvr/dvr_db.c +++ b/src/dvr/dvr_db.c @@ -1606,8 +1606,9 @@ static int _dvr_duplicate_unique_match(dvr_entry_t *de1, dvr_entry_t *de2, void * AND episode are present since OTA often have just "Ep 1" without * giving the season. */ - if (de1->de_epnum.e_num && de2->de_epnum.e_num) - return de1->de_epnum.e_num == de2->de_epnum.e_num ? DUP : NOT_DUP; + if (de1->de_epnum.s_num && de1->de_epnum.e_num && + de2->de_epnum.s_num && de2->de_epnum.e_num) + return de1->de_epnum.s_num == de2->de_epnum.s_num && de1->de_epnum.e_num == de2->de_epnum.e_num ? DUP : NOT_DUP; /* Only one has season and episode? Then can't be a dup with the * other one that doesn't have season+episode