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

Allowed for installing .zip without audioclip

parent 4351ee9c
...@@ -50,12 +50,18 @@ class SRXD { ...@@ -50,12 +50,18 @@ 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")
if (fs.existsSync(OggFilePath)) {
let oggFilesInBackupLocation = this.getFilesFromPath(OggFilePath);
this.songLocation = path.join(this.backupLocation, oggFilesInBackupLocation[0]); 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() {
// Remove temp files // Remove temp files
......
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