mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-15 07:21:50 +08:00
SongStorage: Fix imported osu songs not getting titles
This commit is contained in:
parent
0d13f14f45
commit
ac0483b389
@ -304,8 +304,7 @@
|
|||||||
subtitle_lang: osu.metadata.Artist || osu.metadata.ArtistUnicode,
|
subtitle_lang: osu.metadata.Artist || osu.metadata.ArtistUnicode,
|
||||||
preview: osu.generalInfo.PreviewTime / 1000,
|
preview: osu.generalInfo.PreviewTime / 1000,
|
||||||
stars: [null, null, null, parseInt(osu.difficulty.overallDifficulty) || 1],
|
stars: [null, null, null, parseInt(osu.difficulty.overallDifficulty) || 1],
|
||||||
music: this.otherFiles[dir + osu.generalInfo.AudioFilename.toLowerCase()] || "muted",
|
music: this.otherFiles[dir + osu.generalInfo.AudioFilename.toLowerCase()] || "muted"
|
||||||
hash: md5.base64(event.target.result).slice(0, -2)
|
|
||||||
}
|
}
|
||||||
var filename = file.name.slice(0, file.name.lastIndexOf("."))
|
var filename = file.name.slice(0, file.name.lastIndexOf("."))
|
||||||
var title = osu.metadata.TitleUnicode || osu.metadata.Title
|
var title = osu.metadata.TitleUnicode || osu.metadata.Title
|
||||||
@ -322,6 +321,13 @@
|
|||||||
}
|
}
|
||||||
this.songs[index] = songObj
|
this.songs[index] = songObj
|
||||||
songObj.category = category || this.getCategory(file)
|
songObj.category = category || this.getCategory(file)
|
||||||
|
var hash = md5.base64(event.target.result).slice(0, -2)
|
||||||
|
songObj.hash = hash
|
||||||
|
scoreStorage.songTitles[songObj.title] = hash
|
||||||
|
var score = scoreStorage.get(hash)
|
||||||
|
if(score){
|
||||||
|
score.title = songObj.title
|
||||||
|
}
|
||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
reader.readAsText(file)
|
reader.readAsText(file)
|
||||||
return promise
|
return promise
|
||||||
|
Loading…
Reference in New Issue
Block a user