Skip to content

Commit

Permalink
fix lyric sequence problem
Browse files Browse the repository at this point in the history
  • Loading branch information
listen1 committed Feb 3, 2021
1 parent bfc5121 commit fa45765
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1126,15 +1126,20 @@ const main = () => {
result = timeResult.concat(timeResultTrans).sort((a, b) => {
const keyA = a.seconds;
const keyB = b.seconds;

// Compare the 2 dates
if (keyA < keyB) return -1;
if (keyA > keyB) return 1;
if (a.translationFlag !== b.translationFlag) {
if (a.translationFlag === false) {
return -1;
}
return 1;
}
if (a.index < b.index) return -1;
if (a.index > b.index) return 1;
if (!a.translationFlag) return -1;
return 0;
});

// disable tag info, because music provider always write
// tag info in lyric timeline.
// result.push.apply(result, timeResult);
Expand Down

0 comments on commit fa45765

Please sign in to comment.