From 0c7b407c4b0cad574a156f4e976414b2476b99a8 Mon Sep 17 00:00:00 2001 From: djp952 Date: Sat, 12 Feb 2022 13:39:30 -0500 Subject: [PATCH] Fix bug preventing EPG data from being transferred to Kodi if 'Show DRM protected channels in channel lineups' is enabled --- pvr.hdhomerundvr/changelog.txt | 1 + src/database.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pvr.hdhomerundvr/changelog.txt b/pvr.hdhomerundvr/changelog.txt index 3c0cefb..cded73b 100644 --- a/pvr.hdhomerundvr/changelog.txt +++ b/pvr.hdhomerundvr/changelog.txt @@ -1,6 +1,7 @@ v4.8.1 (2022.02.xx) - Fix HTTP query error messages reporting the multipart/form-data POST operation method as 'get' - Fix bug preventing HTTP device discovery from completing if a device cannot be contacted + - Fix bug preventing EPG data from being transferred to Kodi if 'Show DRM protected channels in channel lineups' is enabled - Add a date/time stamp to the end of messages stored in the error log - Add new "Use HTTP proxy server for discovery operations" Advanced option - Remove "Disable reporting of active Live TV tuner signal status" Interface option diff --git a/src/database.cpp b/src/database.cpp index 89969a5..f048546 100644 --- a/src/database.cpp +++ b/src/database.cpp @@ -1622,7 +1622,7 @@ void enumerate_listings(sqlite3* instance, bool showdrm, int maxdays, enumerate_ // seriesid | title | broadcastid | channelid | starttime | endtime | synopsis | year | iconurl | programtype | genretype | genres | originalairdate | seriesnumber | episodenumber | episodename | isnew | starrating auto sql = "with allchannels(number) as " - "(select distinct(json_extract(entry.value, '$.GuideNumber')) as number from lineup, json_each(lineup.data) as entry where coalesce(json_extract(entry.value, '$.DRM'), 0) = ?1) " + "(select distinct(json_extract(entry.value, '$.GuideNumber')) as number from lineup, json_each(lineup.data) as entry where nullif(json_extract(entry.value, '$.DRM'), ?1) is null) " "select listing.seriesid as seriesid, " "listing.title as title, " "fnv_hash(encode_channel_id(guide.number), listing.starttime, listing.endtime) as broadcastid, " @@ -1718,7 +1718,7 @@ void enumerate_listings(sqlite3* instance, bool showdrm, union channelid channel // seriesid | title | broadcastid | starttime | endtime | synopsis | year | iconurl | programtype | genretype | genres | originalairdate | seriesnumber | episodenumber | episodename | isnew | starrating auto sql = "with allchannels(number) as " - "(select distinct(json_extract(entry.value, '$.GuideNumber')) as number from lineup, json_each(lineup.data) as entry where coalesce(json_extract(entry.value, '$.DRM'), 0) = ?1) " + "(select distinct(json_extract(entry.value, '$.GuideNumber')) as number from lineup, json_each(lineup.data) as entry where nullif(json_extract(entry.value, '$.DRM'), ?1) is null) " "select listing.seriesid as seriesid, " "listing.title as title, " "fnv_hash(encode_channel_id(guide.number), listing.starttime, listing.endtime) as broadcastid, "