View: Fix donbg scrolling

- All metadata fields in imported TJA files are now optional
- Added new metadata fields: `TITLEEN` and `SUBTITLEEN` (`EN` can be any language id from strings.js)
This commit is contained in:
LoveEevee
2019-03-06 00:48:30 +03:00
parent a9006e7ca2
commit 7ee8773e61
9 changed files with 75 additions and 43 deletions

View File

@@ -1753,15 +1753,15 @@ class SongSelect{
}
new Promise((resolve, reject) => {
if(currentSong.music){
songObj.preview_time = prvTime
snd.previewGain.load(currentSong.music, true).then(resolve, reject)
}else{
if(!currentSong.music){
songObj.preview_time = 0
loadPreview(previewFilename).catch(() => {
songObj.preview_time = prvTime
return loadPreview("/main.mp3")
}).then(resolve, reject)
}else if(currentSong.music !== "muted"){
songObj.preview_time = prvTime
snd.previewGain.load(currentSong.music, true).then(resolve, reject)
}
}).then(sound => {
if(currentId === this.previewId){