Open Macadoshis opened 1 year ago
As shown in the DTD, star-rating
and date
are no mandatory fields, so the code should work when those 2 fields are missing.
Can you PR the change? I’m happy to review it you do so. On the Nexus branch first please.
Hello @AlwinEsch , @phunkyfish, (sorry for the mentions but you look like the only 2 guys active)
I think there's an issue in the following process :
https://github.com/kodi-pvr/pvr.stalker/blob/ef243471bc8f8c1b4d6c1d53018573e59d6172e6/src/GuideManager.cpp#L186-L191
I get following error when loading my XMLEPG :
Indeed for a
programme
as follow :there's actually no default fallback in the instantiation of a
programme
from xml for the 2 propertiesdate
andstar-rating
that actually most of the XMLTV providers don't offer (!)https://github.com/kodi-pvr/pvr.stalker/blob/ef243471bc8f8c1b4d6c1d53018573e59d6172e6/lib/libstalkerclient/xmltv.c#L266
So the
std::stoi
method tries to read a null value producing this error.I've tested with the following fix, by manually adding in epg_xmltv.xml :
and it worked (stalkerclient managed to create the guide for this program and channel).
TL;DR
So can you please :
Either check upon null/empty before read or instantiate by default the
XMLTV::Programme#date
from thestart
(YYYYMMDD).Either check upon null/empty before read or instantiate by default the
XMLTV::Programme#starRating
to0
or1
.Thanks a lot.
I think it might help a lot of people and prevent me from having to fork just for those 2 minor fixes.