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 { ...@@ -50,11 +50,17 @@ class SRXD {
this.songTrackInfo = songTrackInfo; this.songTrackInfo = songTrackInfo;
// Load OGG file // Load OGG file
let oggFilesInBackupLocation = this.getFilesFromPath(path.join(this.backupLocation, "AudioClips"), ".ogg"); let OggFilePath = fs.existsSync(path.join(this.backupLocation, "AudioClips"), ".ogg")
this.songLocation = path.join(this.backupLocation, oggFilesInBackupLocation[0]); if (fs.existsSync(OggFilePath)) {
let oggFilesInBackupLocation = this.getFilesFromPath(OggFilePath);
this.songLocation = path.join(this.backupLocation, oggFilesInBackupLocation[0]);
// TODO: Backup Validation // TODO: Backup Validation
return this.backupLocation; return this.backupLocation;
}
else{
return this.backupLocation;
}
} }
async unloadBackup() { async unloadBackup() {
...@@ -115,4 +121,4 @@ class SRXD { ...@@ -115,4 +121,4 @@ class SRXD {
} }
} }
module.exports = SRXD; module.exports = SRXD;
\ No newline at end of file
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