Skip to content

Commit

Permalink
Include artist name in lrclib search, closes #117
Browse files Browse the repository at this point in the history
  • Loading branch information
Lambada10 committed Dec 9, 2024
1 parent 106e1d7 commit 789d961
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ class LRCLibAPI {
suspend fun getSongInfo(query: SongInfo, offset: Int = 0): SongInfo? {
val search = withContext(Dispatchers.IO) {
URLEncoder.encode(
"${query.songName}", // it doesn't work with artist name and song name together
"${query.songName} ${query.artistName}",
StandardCharsets.UTF_8.toString()
)
}

if (search == "")
if (search == "+")
throw EmptyQueryException()

val response = client.get(
Expand Down

0 comments on commit 789d961

Please sign in to comment.