added a fix for instlaling OBB files direct from patreon
This commit is contained in:
@@ -887,7 +887,11 @@ export class AdbClientService {
|
||||
}
|
||||
installLocalObb(filepath: string, dontCatchError = false, cb = null, number?: number, total?: number, task?, name?: string) {
|
||||
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;
|
||||
const showTotal = number && total ? '(' + number + '/' + total + ') ' : '';
|
||||
if (!task) this.spinnerService.showLoader();
|
||||
|
||||
@@ -93,10 +93,10 @@ export class ElectronService {
|
||||
this.adbService.installZip(data.url, 0, 0, true);
|
||||
break;
|
||||
case '.obb':
|
||||
this.adbService.installObb(data.url);
|
||||
this.adbService.installObb(data.url, 0, 0, data.name);
|
||||
break;
|
||||
case '.apk':
|
||||
this.adbService.installAPK(data.url);
|
||||
this.adbService.installAPK(data.url, false, false, 0, 0, true, data.name);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user