Skip to content

Commit 2c9fc7d

Browse files
committed
chore: clean up plain lyrics tags
1 parent 0fdf533 commit 2c9fc7d

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

lib/controller/lyrics_controller.dart

+7-3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ class Lyrics {
8383
}
8484
}
8585

86+
String _cleanPlainLyrics(String lyrics) {
87+
return Lrc.cleanPlainLyrics(lyrics);
88+
}
89+
8690
Future<void> _updateLyrics(Playable item) async {
8791
resetLyrics();
8892
_currentItem = item;
@@ -108,7 +112,7 @@ class Lyrics {
108112
currentLyricsLRC.value = lrc;
109113
_updateWidgets(lrc);
110114
} else {
111-
currentLyricsText.value = embedded;
115+
currentLyricsText.value = _cleanPlainLyrics(embedded);
112116
_updateWidgets(null);
113117
}
114118
return;
@@ -127,7 +131,7 @@ class Lyrics {
127131
_updateWidgets(lrcLyrics.$1);
128132
return;
129133
} else if (lrcLyrics.$2 != null) {
130-
currentLyricsText.value = lrcLyrics.$2 ?? '';
134+
currentLyricsText.value = _cleanPlainLyrics(lrcLyrics.$2!);
131135
_updateWidgets(null);
132136
return;
133137
}
@@ -142,7 +146,7 @@ class Lyrics {
142146
if (checkInterrupted()) return;
143147

144148
if (textLyrics != '') {
145-
currentLyricsText.value = textLyrics;
149+
currentLyricsText.value = _cleanPlainLyrics(textLyrics);
146150
} else {
147151
lyricsCanBeAvailable.value = false;
148152
}

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: namida
22
description: A Beautiful and Feature-rich Music Player, With YouTube & Video Support Built in Flutter
33
publish_to: "none"
4-
version: 5.0.3-beta+250302118
4+
version: 5.0.31-beta+250302211
55

66
environment:
77
sdk: ">=3.6.0 <4.0.0"

0 commit comments

Comments
 (0)