migrated to new mod type support

This commit is contained in:
Shane Harris
2020-08-17 13:31:48 +01:00
committed by Your Name
parent 540e306d7a
commit ef163b2335
+5 -1
View File
@@ -84,8 +84,11 @@ export class ElectronService {
for (let i = 0; i < body.data.apps.length; i++) { for (let i = 0; i < body.data.apps.length; i++) {
let app = body.data.apps[i]; let app = body.data.apps[i];
if (Number(app.app_categories_id) === 1) { if (Number(app.app_categories_id) === 1) {
let urls = app.urls.filter(l => l && ~['Github Release', 'APK', 'OBB'].indexOf(l.provider)); let urls = app.urls.filter(l => l && ~['Github Release', 'APK', 'OBB', 'Mod'].indexOf(l.provider));
for (let i = 0; i < urls.length; i++) { for (let i = 0; i < urls.length; i++) {
if (urls[i].provider === 'Mod') {
this.beatonService.downloadSong(urls[i].link_url, this.adbService);
} else {
const etx = urls[i].link_url const etx = urls[i].link_url
.split('?')[0] .split('?')[0]
.split('.') .split('.')
@@ -111,6 +114,7 @@ export class ElectronService {
} }
} }
} }
}
}); });
} }