Skip to content

Commit 80e3b5d

Browse files
ComputerEliteComputerElite
authored andcommitted
fixes
1 parent 45d49c3 commit 80e3b5d

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

QuestAppVersionSwitcher/Assets/html/flows/beat_saber_modding.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,12 @@ <h1>Download is done!</h1>
248248
method: "POST",
249249
body: `https://oculusdb.rui2015.me/api/coremodsdownload/${moddedStatus.version}.qmod`
250250
}).then(res => {
251-
location = start + "/?tab=mods"
251+
fetch(start + `/api/mods/installfromurl`, {
252+
method: "POST",
253+
body: `https://github.com/ComputerElite/QuestAppVersionSwitcher/releases/download/1.10.8/CustomTypesPatched.qmod`
254+
}).then(res => {
255+
location = start + "/?tab=mods"
256+
})
252257
})
253258
})
254259
}
@@ -258,13 +263,20 @@ <h1>Download is done!</h1>
258263
}
259264

260265
function PatchDone() {
266+
modgameloader.style.display = "none"
261267
OpenTab("afterpatch")
262268
}
263269

264270
function RestoreBackup() {
265271
location = start + `/?package=com.beatgames.beatsaber&backup=${patchReport.backupName}&restorenow=true&noaccesscheck=true&afterrestore=${encodeURIComponent(`/flows/beat_saber_modding?tab=afterrestore`)}`
266272
}
267273

274+
function ResetPatchPage() {
275+
276+
document.getElementById("modgamebutton").style.display = "block"
277+
modgameloader.style.display = "none"
278+
}
279+
268280
function PatchGame() {
269281
const patchOptions = {
270282
otherPermissions: [],
@@ -275,6 +287,7 @@ <h1>Download is done!</h1>
275287
}
276288
document.getElementById("modgamebutton").style.display = "none"
277289
patchInProgressContainer.style.display = "block"
290+
modgameloader.style.display = "block"
278291
patchingStatus.className = ""
279292
patchingStatus.classList.add("text")
280293
fetch(start + `/api/patching/patchoptions`, {
@@ -299,6 +312,7 @@ <h1>Download is done!</h1>
299312
} else if (j.error) {
300313
patchingStatus.innerHTML = j.errorText
301314
patchingStatus.classList.add("error")
315+
ResetPatchPage()
302316
clearInterval(i)
303317
} else {
304318
patchingStatus.innerHTML = j.progressString + " - " + j.currentOperation
@@ -308,6 +322,7 @@ <h1>Download is done!</h1>
308322
}, 500);
309323
} else {
310324
patchingStatus.innerHTML = j.msg
325+
ResetPatchPage()
311326
patchingStatus.classList.add("error")
312327
}
313328
})

QuestAppVersionSwitcher/Properties/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.12.0" package="com.ComputerElite.questappversionswitcher" android:installLocation="preferExternal" android:versionCode="69">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.12.1" package="com.ComputerElite.questappversionswitcher" android:installLocation="preferExternal" android:versionCode="70">
33
<uses-sdk android:minSdkVersion="28" android:targetSdkVersion="32" />
44
<uses-permission android:name="oculus.permission.handtracking" />
55
<uses-permission android:name="com.oculus.permission.HAND_TRACKING" />

QuestAppVersionSwitcher/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
// Minor Version
2323
// Build Number
2424
// Revision
25-
[assembly: AssemblyVersion("1.12.0.0")]
26-
[assembly: AssemblyFileVersion("1.12.0.0")]
25+
[assembly: AssemblyVersion("1.12.1.0")]
26+
[assembly: AssemblyFileVersion("1.12.1.0")]

QuestAppVersionSwitcher/WebServer.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,8 @@ public void Start()
388388
string apkPath = "";
389389
if (package != null && backup != null)
390390
{
391+
392+
Logger.Log("Trying to patch apk from backup " + package + " - " + backup);
391393
string backupDir = CoreService.coreVars.QAVSBackupDir + package + "/" + backup + "/";
392394
if (!Directory.Exists(backupDir))
393395
{
@@ -406,14 +408,14 @@ public void Start()
406408
if (!AndroidService.IsPackageInstalled(CoreService.coreVars.currentApp))
407409
{
408410
request.SendString(GenericResponse.GetResponse(CoreService.coreVars.currentApp + "is not installed. Please install it", true), "application/json", 202);
409-
410411
return true;
411412
}
412413

413414
apkPath = AndroidService.FindAPKLocation(CoreService.coreVars.currentApp);
414415
}
415416
request.SendString(GenericResponse.GetResponse("Acknowledged. Check status at /patching/patchstatus", true), "application/json", 202);
416417

418+
Logger.Log("Using apk from " + apkPath);
417419

418420
string appLocation = CoreService.coreVars.QAVSTmpPatchingDir + "app.apk";
419421
FileManager.RecreateDirectoryIfExisting(CoreService.coreVars.QAVSTmpPatchingDir);

0 commit comments

Comments
 (0)