mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-08 06:31:50 +08:00
Modify regex to recognize edition from jason #4933
This commit is contained in:
@@ -50,7 +50,7 @@ int WebClient::getEdition(
|
||||
if (resultRegex.exactMatch(responseJson)) {
|
||||
QString boolString = resultRegex.cap(1);
|
||||
if (boolString == "true") {
|
||||
QRegExp editionRegex(".*\"edition\".*:.*\"([^\"]+)\".*");
|
||||
QRegExp editionRegex(".*\"edition\":(0|1|2|3).*");
|
||||
if (editionRegex.exactMatch(responseJson)) {
|
||||
QString e = editionRegex.cap(1);
|
||||
edition = e.toInt();
|
||||
|
||||
Reference in New Issue
Block a user