mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-10-23 10:53:45 +02:00
Restore RuStore support through replace URL of API.
If the application is published as an AAB, then the old one produced an unusable file (one of split files). The new one provide a monolithic file.
This commit is contained in:
@@ -80,20 +80,20 @@ class RuStore extends AppSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Response res1 = await sourceRequest(
|
Response res1 = await sourceRequest(
|
||||||
'https://backapi.rustore.ru/applicationData/download-link',
|
'https://backapi.rustore.ru/applicationData/v2/download-link',
|
||||||
additionalSettings,
|
additionalSettings,
|
||||||
followRedirects: false,
|
followRedirects: false,
|
||||||
postBody: {"appId": appDetails['appId'], "firstInstall": true},
|
postBody: {"appId": appDetails['appId'], "firstInstall": true},
|
||||||
);
|
);
|
||||||
var downloadDetails = (await decodeJsonBody(res1.bodyBytes))['body'];
|
var downloadDetails = (await decodeJsonBody(res1.bodyBytes))['body'];
|
||||||
if (res1.statusCode != 200 || downloadDetails['apkUrl'] == null) {
|
if (res1.statusCode != 200 || downloadDetails['downloadUrls'][0]['url'] == null) {
|
||||||
throw NoAPKError();
|
throw NoAPKError();
|
||||||
}
|
}
|
||||||
|
|
||||||
return APKDetails(
|
return APKDetails(
|
||||||
version,
|
version,
|
||||||
getApkUrlsFromUrls([
|
getApkUrlsFromUrls([
|
||||||
(downloadDetails['apkUrl'] as String).replaceAll(
|
(downloadDetails['downloadUrls'][0]['url'] as String).replaceAll(
|
||||||
RegExp('\\.zip\$'),
|
RegExp('\\.zip\$'),
|
||||||
'.apk',
|
'.apk',
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user