From e9652871c6b5578a7c1d0ad366c84c2ec305b881 Mon Sep 17 00:00:00 2001 From: maikirakiwi Date: Fri, 8 Jul 2022 23:55:38 -0700 Subject: [PATCH] Revert "test" This reverts commit 256d06bbccfb6dc0cd23c5bc7fe15bd19923a43a. --- src/renderer/main/vueapp.js | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/src/renderer/main/vueapp.js b/src/renderer/main/vueapp.js index d6254a36..41ebfeed 100644 --- a/src/renderer/main/vueapp.js +++ b/src/renderer/main/vueapp.js @@ -3187,30 +3187,20 @@ const app = new Vue({ let applied = 0; for (let i = 1; applied < app.lyrics.length; i+=2) { // Start on odd elements because even ones are original. - try { - if (app.lyrics[applied].line.trim() != "" && raw_lines[i].childNodes[0].childNodes[0].textContent.trim() != ""){ - if (app.lyrics[applied].line.trim() === raw_lines[i].childNodes[0].childNodes[0].textContent.trim()) { - // Do Nothing and skip to next raw lyric. - applied +=1; - } - else { - if (app.lyrics[applied].line === "lrcInstrumental") { - if (app.lyrics[applied+1].line.trim() === raw_lines[i].childNodes[0].childNodes[0].textContent.trim()) { - // Do Nothing and skip to next raw lyric. - applied +=2; - } - else { - app.lyrics[applied+1].translation = raw_lines[i].childNodes[0].childNodes[0].textContent; - applied +=2; - } - } - else { - app.lyrics[applied].translation = raw_lines[i].childNodes[0].childNodes[0].textContent; - applied +=1; - } - } + if (app.lyrics[applied].line === raw_lines[i].childNodes[0].childNodes[0].textContent) { + // Do Nothing + applied +=1; + } + else { + if (app.lyrics[applied].line === "lrcInstrumental") { + app.lyrics[applied+1].translation = raw_lines[i].childNodes[0].childNodes[0].textContent; + applied +=2; + } + else { + app.lyrics[applied].translation = raw_lines[i].childNodes[0].childNodes[0].textContent; + applied +=1; } - } catch(e) {} + } } }) }