Skip to content

Commit

Permalink
Update to latest echo & fix browse recommendation
Browse files Browse the repository at this point in the history
  • Loading branch information
LuftVerbot committed Dec 13, 2024
1 parent 403d18f commit 2af8c4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class DeezerSearchClient(private val api: DeezerApi, private val history: Boolea
@Volatile
private var oldSearch: Pair<String, List<Shelf>>? = null

suspend fun quickSearch(query: String?): List<QuickSearchItem.Query> {
suspend fun quickSearch(query: String): List<QuickSearchItem.Query> {
DeezerExtension().handleArlExpiration()
return if (query.isNullOrEmpty()) {
return if (query.isBlank()) {
val queryList = mutableListOf<QuickSearchItem.Query>()
val jsonObject = api.getSearchHistory()
val resultObject = jsonObject["results"]!!.jsonObject
Expand Down Expand Up @@ -58,9 +58,9 @@ class DeezerSearchClient(private val api: DeezerApi, private val history: Boolea
}
}

fun searchFeed(query: String?, tab: Tab?): PagedData.Single<Shelf> = PagedData.Single {
fun searchFeed(query: String, tab: Tab?): PagedData.Single<Shelf> = PagedData.Single {
DeezerExtension().handleArlExpiration()
query ?: return@Single browseFeed()
query.ifBlank { return@Single browseFeed() }

if (history) {
api.setSearchHistory(query)
Expand Down Expand Up @@ -118,9 +118,9 @@ class DeezerSearchClient(private val api: DeezerApi, private val history: Boolea
}
}

suspend fun searchTabs(query: String?): List<Tab> {
suspend fun searchTabs(query: String): List<Tab> {
DeezerExtension().handleArlExpiration()
query ?: return emptyList()
query.ifBlank { return emptyList() }

val jsonObject = api.search(query)
val resultObject = jsonObject["results"]?.jsonObject
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ android.useAndroidX=true
kotlin.code.style=official
android.nonTransitiveRClass=true

libVersion=016505f4ed
libVersion=2552ee0c22

extType=music
extId=deezer
Expand Down

0 comments on commit 2af8c4c

Please sign in to comment.