bugfix for installing apps

This commit is contained in:
karl.hudgell 2020-08-27 11:42:00 +01:00
parent c2a544013b
commit e0a67fd98f
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "miwatchkleaner2.0",
"version": "2.0.8",
"version": "2.0.9",
"description": "MiWatch Cleaning Tool",
"main": "app.js",
"bin": "app.js",

View File

@ -73,7 +73,8 @@ module.exports = {
for (let element of value.removeAppsList) {
for (let element2 of compatibleApps) {
if (element === element2.name) {
await common.downloadFile(element2.url, './data/apps/' + element2.name + '.apk')
newName = element.replace(/\s/g, '');
await common.downloadFile(element2.url, './data/apps/' + newName + '.apk')
}
}
}
@ -238,7 +239,8 @@ module.exports = {
if (element.Klean === "X") {
try {
logger.info('Downloading Latest ' + element.name + ' Complete')
await common.downloadFile(element.url, './data/apps/' + element.name + '.apk')
newName = element.name.replace(/\s/g, '');
await common.downloadFile(element.url, './data/apps/' + newName + '.apk')
logger.info('Downloading Latest ' + element.name + ' Complete')
} catch (error) {
logger.info('Downloading Latest ' + element.name + ' FAILED')