song name fix?

This commit is contained in:
ChomeNS 2022-12-31 15:49:56 +07:00
parent 1d0d365eed
commit 442522a91f

View file

@ -86,9 +86,11 @@ function inject (bot) {
switch (path.extname(fallbackName)) { switch (path.extname(fallbackName)) {
case '.nbs': case '.nbs':
song = convertNBS(buffer) song = convertNBS(buffer)
if (song.name === '') song.name = fallbackName
break break
case '.txt': case '.txt':
song = parseTXTSong(buffer.toString()) song = parseTXTSong(buffer.toString())
song.name = fallbackName
break break
default: default:
// eslint-disable-next-line no-case-declarations // eslint-disable-next-line no-case-declarations