ScoreStorage: Use hashes instead of song titles
This commit is contained in:
@@ -274,6 +274,13 @@
|
||||
if(songObj.stars.length !== 0){
|
||||
this.songs[index] = songObj
|
||||
}
|
||||
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(() => {})
|
||||
reader.readAsText(file, "sjis")
|
||||
return promise
|
||||
@@ -297,7 +304,8 @@
|
||||
subtitle_lang: osu.metadata.Artist || osu.metadata.ArtistUnicode,
|
||||
preview: osu.generalInfo.PreviewTime / 1000,
|
||||
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 title = osu.metadata.TitleUnicode || osu.metadata.Title
|
||||
|
||||
Reference in New Issue
Block a user