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: 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 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;