Show latest version if the app has multiple versions

This commit is contained in:
foxster-mp4
2023-07-18 11:40:58 -07:00
parent 8ed7aa4bc1
commit 2b2b279e13
3 changed files with 12 additions and 2 deletions

View File

@@ -38,6 +38,16 @@ main((json) => {
const app = getAppWithBundleId(bundleId);
if (!app) exit();
// If has multiple versions, show the latest one
if (app.versions) {
const latestVersion = app.versions[0];
app.version = latestVersion.version;
app.versionDate = latestVersion.date;
app.versionDescription = latestVersion.localizedDescription;
app.downloadURL = latestVersion.downloadURL;
app.size = latestVersion.size;
}
// Set tab title
document.title = `${app.name} - ${json.name}`;