use a slightly different way of getting build number
This commit is contained in:
@@ -43,8 +43,8 @@ std::optional<Glib::ustring> GetJavascriptFileFromAppPage(const Glib::ustring &c
|
|||||||
start_position += str.size();
|
start_position += str.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matches.size() >= 7) {
|
if (matches.size() >= 2) {
|
||||||
return matches[matches.size() - 7];
|
return matches[matches.size() - 2];
|
||||||
}
|
}
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
@@ -64,7 +64,7 @@ std::optional<uint32_t> GetBuildNumberFromJSURL(const Glib::ustring &url, const
|
|||||||
auto res = req.execute();
|
auto res = req.execute();
|
||||||
if (res.error) return {};
|
if (res.error) return {};
|
||||||
|
|
||||||
auto regex = Glib::Regex::create("buildNumber:\"(\\d+)\"");
|
auto regex = Glib::Regex::create(R"(Build Number: "\).concat\("(\d+))");
|
||||||
Glib::MatchInfo match;
|
Glib::MatchInfo match;
|
||||||
Glib::ustring string = res.text;
|
Glib::ustring string = res.text;
|
||||||
if (regex->match(string, match)) {
|
if (regex->match(string, match)) {
|
||||||
|
Reference in New Issue
Block a user