added a fix for instlaling OBB files direct from patreon

This commit is contained in:
Shane Harris
2020-10-01 12:15:30 +01:00
parent d3ef55b467
commit ddf33e79cb
3 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -887,7 +887,11 @@ export class AdbClientService {
} }
installLocalObb(filepath: string, dontCatchError = false, cb = null, number?: number, total?: number, task?, name?: string) { installLocalObb(filepath: string, dontCatchError = false, cb = null, number?: number, total?: number, task?, name?: string) {
let filename = this.appService.path.basename(filepath); let filename = this.appService.path.basename(filepath);
let packageId = filename.match(/[a-z]{4,5}.[0-9]{1,}.([A-z0-9.]{1,}).obb/)[1]; let match = filename.match(/[a-z]{4,5}.[0-9]{1,}.([A-z0-9.]{1,}).obb/);
if (!match || !match.length) {
match = name.match(/[a-z]{4,5}.[0-9]{1,}.([A-z0-9.]{1,}).obb/);
}
let packageId = match[1];
name = name || packageId; name = name || packageId;
const showTotal = number && total ? '(' + number + '/' + total + ') ' : ''; const showTotal = number && total ? '(' + number + '/' + total + ') ' : '';
if (!task) this.spinnerService.showLoader(); if (!task) this.spinnerService.showLoader();
+2 -2
View File
@@ -93,10 +93,10 @@ export class ElectronService {
this.adbService.installZip(data.url, 0, 0, true); this.adbService.installZip(data.url, 0, 0, true);
break; break;
case '.obb': case '.obb':
this.adbService.installObb(data.url); this.adbService.installObb(data.url, 0, 0, data.name);
break; break;
case '.apk': case '.apk':
this.adbService.installAPK(data.url); this.adbService.installAPK(data.url, false, false, 0, 0, true, data.name);
break; break;
} }
}); });
Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB