Fixed stupidity

This commit is contained in:
Colon 2020-10-03 22:01:14 -04:00
parent d343d6c651
commit e08e36e7e2
4 changed files with 5 additions and 5 deletions

View file

@ -54,7 +54,7 @@ module.exports = async (app, req, res, api, ID, analyze) => {
level.songName = songData[2] || "Unknown"
level.songAuthor = songData[4] || "Unknown"
level.songSize = (songData[5] || "0") + "MB"
level.songID = songData[1] || level.customSong
level.songID = songData[1] || String(level.customSong)
if (!songData[2]) level.invalidSong = true
}

View file

@ -46,7 +46,7 @@ module.exports = async (app, req, res, api, analyze) => {
level.songName = song[2] || "Unknown"
level.songAuthor = song[4] || "Unknown"
level.songSize = (song[5] || "0") + "MB"
level.songID = song[1] || level.customSong
level.songID = song[1] || String(level.customSong)
}
else {

View file

@ -50,9 +50,9 @@ class Level {
if (this.password && this.password != 0) {
let xor = new XOR();
let pass = config.xorPasswords ? +xor.decrypt(this.password, 26364) : this.password;
let pass = config.xorPasswords ? xor.decrypt(this.password, 26364) : this.password;
if (pass.length > 1) this.password = pass.slice(1);
else this.password = +pass;
else this.password = pass;
}
}
}

View file

@ -116,7 +116,7 @@ let demons = []
let demonMode = false;
$('#userSearch').click(function() {
let query = encodeURIComponent($('#levelName').val())
let query = encodeURIComponent($('#levelName').val()).replace(/%2F/gi, "")
if (query) window.location.href = "./u/" + query
})