Fix(solfa): support multiple override lyrics tag
This commit is contained in:
parent
382373d6be
commit
d6c7b70792
1 changed files with 3 additions and 3 deletions
|
|
@ -2757,9 +2757,9 @@ class Solfa(val sharedScreenModel: SharedScreenModel, private val fileRepository
|
||||||
positionDS.add(i)
|
positionDS.add(i)
|
||||||
}
|
}
|
||||||
val originalLyrics = REGEX_STRIP_DC.replace(lyricsItem, "")
|
val originalLyrics = REGEX_STRIP_DC.replace(lyricsItem, "")
|
||||||
val REGEX_OVERRIDE = Regex(".*\\$\\{O:(\\d+)\\}.*")
|
val REGEX_OVERRIDE = Regex("\\$\\{O:(\\d+)\\}")
|
||||||
if (REGEX_OVERRIDE.matches(lyricsItem)) {
|
REGEX_OVERRIDE.findAll(lyricsItem).forEach { matchResult ->
|
||||||
val overrideNumber = lyricsItem.replace(REGEX_OVERRIDE, "$1").toInt()
|
val overrideNumber = matchResult.groupValues[1].toInt()
|
||||||
val override = O.getOrElse(overrideNumber) { null }
|
val override = O.getOrElse(overrideNumber) { null }
|
||||||
override?.forEachIndexed { index, value ->
|
override?.forEachIndexed { index, value ->
|
||||||
val matchResult = Regex("v(\\d+):(.*)").find(value)
|
val matchResult = Regex("v(\\d+):(.*)").find(value)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue