mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-15 07:21:50 +08:00
Allow non-standard genre field, add genre to osu songs
This commit is contained in:
parent
8bc9aee594
commit
886979ad36
@ -148,13 +148,15 @@
|
|||||||
}
|
}
|
||||||
if(category){
|
if(category){
|
||||||
var metaPath = file.webkitRelativePath.toLowerCase().slice(0, file.name.length * -1)
|
var metaPath = file.webkitRelativePath.toLowerCase().slice(0, file.name.length * -1)
|
||||||
this.tjaFiles.forEach(fileObj => {
|
var filesLoop = fileObj => {
|
||||||
var tjaPath = fileObj.file.webkitRelativePath.toLowerCase().slice(0, fileObj.file.name.length * -1)
|
var tjaPath = fileObj.file.webkitRelativePath.toLowerCase().slice(0, fileObj.file.name.length * -1)
|
||||||
if(tjaPath.startsWith(metaPath) && (!("categoryLevel" in fileObj) || fileObj.categoryLevel < level)){
|
if(tjaPath.startsWith(metaPath) && (!("categoryLevel" in fileObj) || fileObj.categoryLevel < level)){
|
||||||
fileObj.category = category
|
fileObj.category = category
|
||||||
fileObj.categoryLevel = level
|
fileObj.categoryLevel = level
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
this.tjaFiles.forEach(filesLoop)
|
||||||
|
this.osuFiles.forEach(filesLoop)
|
||||||
}
|
}
|
||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
reader.readAsText(file, "sjis")
|
reader.readAsText(file, "sjis")
|
||||||
@ -193,8 +195,8 @@
|
|||||||
if(meta.wave){
|
if(meta.wave){
|
||||||
songObj.music = this.otherFiles[dir + meta.wave.toLowerCase()]
|
songObj.music = this.otherFiles[dir + meta.wave.toLowerCase()]
|
||||||
}
|
}
|
||||||
if(meta.genre in this.categories){
|
if(meta.genre){
|
||||||
songObj.category = this.categories[meta.genre]
|
songObj.category = this.categories[meta.genre.toLowerCase()] || meta.genre
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!songObj.category){
|
if(!songObj.category){
|
||||||
|
Loading…
Reference in New Issue
Block a user