Skip to content

Commit

Permalink
fix: lrc path resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
zyrouge committed Nov 2, 2024
1 parent df35792 commit f946360
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ class SongRepository(private val symphony: Symphony) {

suspend fun getLyrics(song: Song): String? {
try {
val lrcPath = SimplePath(song.path).nameWithoutExtension + ".lrc"
val lrcPath = SimplePath(song.path).let {
it.parent?.join(it.nameWithoutExtension + ".lrc")?.pathString
}
symphony.groove.exposer.uris[lrcPath]?.let { uri ->
symphony.applicationContext.contentResolver.openInputStream(uri)?.use {
return String(it.readBytes())
Expand Down

0 comments on commit f946360

Please sign in to comment.