summaryrefslogtreecommitdiff
path: root/src/startup.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2023-12-27 01:57:22 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2023-12-27 01:57:22 -0500
commit1bb749687b92fa7fbccb77ee18654210a647a1f3 (patch)
tree68b79b6ca1ef7b3c17c4ada5655255c20f2fa8d3 /src/startup.cpp
parent8bd628c1776c20dbf41d2fb18f6204c4a398da0e (diff)
parent155d95e29cc50a66cbe7711b172b195be637bc48 (diff)
downloadabaddon-portaudio-1bb749687b92fa7fbccb77ee18654210a647a1f3.tar.gz
abaddon-portaudio-1bb749687b92fa7fbccb77ee18654210a647a1f3.zip
Merge branch 'master' into classic-channels
Diffstat (limited to 'src/startup.cpp')
-rw-r--r--src/startup.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/startup.cpp b/src/startup.cpp
index 89e29a5..b6d09a3 100644
--- a/src/startup.cpp
+++ b/src/startup.cpp
@@ -29,7 +29,7 @@ std::optional<std::pair<std::string, std::string>> ParseCookie(const Glib::ustri
}
std::optional<Glib::ustring> GetJavascriptFileFromAppPage(const Glib::ustring &contents) {
- auto regex = Glib::Regex::create(R"(/assets/\w{20}.js)");
+ auto regex = Glib::Regex::create(R"(/assets/\w+\.?\w{20}\.js)");
std::vector<Glib::ustring> matches;
// regex->match_all doesnt work for some reason
@@ -43,8 +43,8 @@ std::optional<Glib::ustring> GetJavascriptFileFromAppPage(const Glib::ustring &c
start_position += str.size();
}
- if (matches.size() >= 6) {
- return matches[matches.size() - 6];
+ if (matches.size() >= 10) {
+ return matches[matches.size() - 10];
}
return {};
@@ -64,7 +64,7 @@ std::optional<uint32_t> GetBuildNumberFromJSURL(const Glib::ustring &url, const
auto res = req.execute();
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::ustring string = res.text;
if (regex->match(string, match)) {