Commit 88f3b8b3 authored by Amy Y's avatar Amy Y Committed by GitHub

Allowed for installing .zip without audioclip

parent 4351ee9c
......@@ -50,11 +50,17 @@ class SRXD {
this.songTrackInfo = songTrackInfo;
// Load OGG file
let oggFilesInBackupLocation = this.getFilesFromPath(path.join(this.backupLocation, "AudioClips"), ".ogg");
this.songLocation = path.join(this.backupLocation, oggFilesInBackupLocation[0]);
let OggFilePath = fs.existsSync(path.join(this.backupLocation, "AudioClips"), ".ogg")
if (fs.existsSync(OggFilePath)) {
let oggFilesInBackupLocation = this.getFilesFromPath(OggFilePath);
this.songLocation = path.join(this.backupLocation, oggFilesInBackupLocation[0]);
// TODO: Backup Validation
return this.backupLocation;
}
else{
return this.backupLocation;
}
}
async unloadBackup() {
......@@ -115,4 +121,4 @@ class SRXD {
}
}
module.exports = SRXD;
\ No newline at end of file
module.exports = SRXD;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment