diff --git a/pvr.iptvsimple/addon.xml.in b/pvr.iptvsimple/addon.xml.in index becd973df..4c91562b0 100644 --- a/pvr.iptvsimple/addon.xml.in +++ b/pvr.iptvsimple/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/pvr.iptvsimple/changelog.txt b/pvr.iptvsimple/changelog.txt index 43b665618..b4db1fd11 100644 --- a/pvr.iptvsimple/changelog.txt +++ b/pvr.iptvsimple/changelog.txt @@ -1,3 +1,6 @@ +v3.8.3 +- Speed up EPG loading + v3.8.2 - Update github wiki link in addon.xml diff --git a/src/PVRIptvData.cpp b/src/PVRIptvData.cpp index 1080f3fe3..5bfdea4e2 100644 --- a/src/PVRIptvData.cpp +++ b/src/PVRIptvData.cpp @@ -419,7 +419,8 @@ bool PVRIptvData::LoadEPG(time_t iStart, time_t iEnd) GetNodeValue(pChannelNode, "date", dateString); if (!dateString.empty()) { - if (std::regex_match(dateString, std::regex("^[1-9][0-9][0-9][0-9][0-9][1-9][0-9][1-9]"))) + static const std::regex dateRegex("^[1-9][0-9][0-9][0-9][0-9][1-9][0-9][1-9]"); + if (std::regex_match(dateString, dateRegex)) entry.firstAired = static_cast(ParseDateTime(dateString)); std::sscanf(dateString.c_str(), "%04d", &entry.iYear); @@ -534,10 +535,12 @@ bool PVRIptvData::ParseXmltvNsEpisodeNumberInfo(const std::string& episodeNumber bool PVRIptvData::ParseOnScreenEpisodeNumberInfo(const std::string& episodeNumberString, PVRIptvEpgEntry& entry) { - const std::string text = std::regex_replace(episodeNumberString, std::regex("[ \\txX_\\.]"), ""); + static const std::regex numRegex("[ \\txX_\\.]"); + const std::string text = std::regex_replace(episodeNumberString, numRegex, ""); std::smatch match; - if (std::regex_match(text, match, std::regex("^[sS]([0-9][0-9]*)[eE][pP]?([0-9][0-9]*)$"))) + static const std::regex epRegex("^[sS]([0-9][0-9]*)[eE][pP]?([0-9][0-9]*)$"); + if (std::regex_match(text, match, epRegex)) { if (match.size() == 3) {