From 9c17fd56a4eae9f04eaf7679377c7a78a0df2ded Mon Sep 17 00:00:00 2001 From: Saad BENBOUZID Date: Sun, 11 Sep 2022 21:59:28 -0400 Subject: [PATCH 1/3] Fix issue #189 : "year" and "starRating" are optional in xmltv contract --- src/GuideManager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/GuideManager.cpp b/src/GuideManager.cpp index e5fd6416..6ee8c69f 100644 --- a/src/GuideManager.cpp +++ b/src/GuideManager.cpp @@ -183,12 +183,14 @@ int GuideManager::AddEvents( e.cast = p->extra.cast; e.directors = p->extra.directors; e.writers = p->extra.writers; - e.year = std::stoi(p->date.substr(0, 4)); + if (!p->date.empty()) + e.year = std::stoi(p->date.substr(0, 4)); e.iconPath = p->icon; e.genreType = p->extra.genreType; e.genreDescription = p->extra.genreDescription; e.firstAired = p->previouslyShown; - e.starRating = std::stoi(p->starRating.substr(0, 1)); + if (!p->starRating.empty()) + e.starRating = std::stoi(p->starRating.substr(0, 1)); e.episodeNumber = p->episodeNumber; e.episodeName = p->subTitle; From eddbe61947255635ed9320d0a34c7b5968fcc4ec Mon Sep 17 00:00:00 2001 From: Saad BENBOUZID Date: Sat, 17 Sep 2022 10:52:36 -0400 Subject: [PATCH 2/3] Fix issue : default value if missing from xml --- lib/libstalkerclient/xmltv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libstalkerclient/xmltv.c b/lib/libstalkerclient/xmltv.c index 6400c8b1..afe85550 100644 --- a/lib/libstalkerclient/xmltv.c +++ b/lib/libstalkerclient/xmltv.c @@ -27,6 +27,8 @@ #include "util.h" +#include + void *sc_xmltv_create(enum sc_xmltv_strct type) { size_t size = 0; void *strct = NULL; @@ -60,6 +62,7 @@ void *sc_xmltv_create(enum sc_xmltv_strct type) { sc_xmltv_programme_t *p = (sc_xmltv_programme_t *) strct; p->credits = sc_list_create(); p->categories = sc_list_create(); + p->episode_num = EPG_TAG_INVALID_SERIES_EPISODE; break; } default: From 7b364bd0ea0dddb01ba92e19a4670917b3a0dd69 Mon Sep 17 00:00:00 2001 From: Saad BENBOUZID Date: Wed, 21 Sep 2022 01:24:27 -0400 Subject: [PATCH 3/3] add bump --- pvr.stalker/addon.xml.in | 2 +- pvr.stalker/changelog.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pvr.stalker/addon.xml.in b/pvr.stalker/addon.xml.in index 3e26d9e7..13571fce 100644 --- a/pvr.stalker/addon.xml.in +++ b/pvr.stalker/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/pvr.stalker/changelog.txt b/pvr.stalker/changelog.txt index 12ec5ba8..c3997109 100644 --- a/pvr.stalker/changelog.txt +++ b/pvr.stalker/changelog.txt @@ -1,3 +1,7 @@ +v20.3.1 +- Fix issue #189 : "year" and "starRating" are optional in xmltv contract +- Fix issue : init episodeNumber to undefined instead of "0" + v20.3.0 - Kodi inputstream API update to version 3.2.0 - Kodi PVR API update to version 8.0.2