@@ -29,27 +29,27 @@ Item {
29
29
API .onLyricCompleted .disconnect (onReply);
30
30
if (lrc === " " ) {
31
31
hasLyric = false ;
32
- return ;
33
- }
34
- hasLyric = true ;
35
- var lines = lrc .split (" \n " );
36
- for (var i = 0 ; i < lines .length ; i++ ) {
37
- var line = lines[i].trim ();
38
- if (line !== " " ) {
39
- var timestampStart = line .indexOf (" [" );
40
- var timestampEnd = line .indexOf (" ]" );
41
- var timestamp = line .substring (timestampStart + 1 , timestampEnd);
42
- var lyric = line .substring (timestampEnd + 1 ).trim ();
43
- var timeParts = timestamp .split (" :" );
44
- var minutes = parseInt (timeParts[0 ]);
45
- var seconds = parseFloat (timeParts[1 ]);
46
- var milliseconds = Math .round ((minutes * 60 + seconds) * 1000 );
47
- if (lyric != " " )
48
- lrcModel .append ({
49
- " time" : milliseconds,
50
- " lyric" : lyric
51
- });
32
+ } else {
33
+ hasLyric = true ;
34
+ var lines = lrc .split (" \n " );
35
+ for (var i = 0 ; i < lines .length ; i++ ) {
36
+ var line = lines[i].trim ();
37
+ if (line !== " " ) {
38
+ var timestampStart = line .indexOf (" [" );
39
+ var timestampEnd = line .indexOf (" ]" );
40
+ var timestamp = line .substring (timestampStart + 1 , timestampEnd);
41
+ var lyric = line .substring (timestampEnd + 1 ).trim ();
42
+ var timeParts = timestamp .split (" :" );
43
+ var minutes = parseInt (timeParts[0 ]);
44
+ var seconds = parseFloat (timeParts[1 ]);
45
+ var milliseconds = Math .round ((minutes * 60 + seconds) * 1000 );
46
+ if (lyric != " " )
47
+ lrcModel .append ({
48
+ " time" : milliseconds,
49
+ " lyric" : lyric
50
+ });
52
51
52
+ }
53
53
}
54
54
}
55
55
initing = false ;
0 commit comments