Skip to content

Commit

Permalink
fix(lyrics): additional space
Browse files Browse the repository at this point in the history
  • Loading branch information
Malopieds committed Apr 13, 2024
1 parent 7ccbf3c commit 37024bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.zionhuang.music.ui.component.animateScrollDuration

@Suppress("RegExpRedundantEscape")
object LyricsUtils {
val LINE_REGEX = "((\\[\\d\\d:\\d\\d\\.\\d{2,3}\\])+)(.+)".toRegex()
val LINE_REGEX = "((\\[\\d\\d:\\d\\d\\.\\d{2,3}\\] ?)+)(.+)".toRegex()
val TIME_REGEX = "\\[(\\d\\d):(\\d\\d)\\.(\\d{2,3})\\]".toRegex()

fun parseLyrics(lyrics: String): List<LyricsEntry> =
Expand Down
3 changes: 1 addition & 2 deletions lrclib/src/main/java/com/zionhuang/lrclib/LrcLib.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ object LrcLib {
parameter("track_name", title)
parameter("artist_name", artist)
if (album != null) parameter("album_name", album)
}.body<List<Track>>()
//}.body<List<Track>>().filter { it.syncedLyrics != null }
}.body<List<Track>>().filter { it.syncedLyrics != null }

suspend fun getLyrics(
title: String,
Expand Down

0 comments on commit 37024bf

Please sign in to comment.