Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/jetpack_compose' into jetpack_co…
Browse files Browse the repository at this point in the history
…mpose
  • Loading branch information
maxrave-dev committed Sep 1, 2024
2 parents 7bce27a + e9a2f07 commit 6a41695
Showing 1 changed file with 29 additions and 25 deletions.
54 changes: 29 additions & 25 deletions app/src/main/java/com/maxrave/simpmusic/data/parser/HomeParser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,26 @@ fun parseMixedContent(data: List<SectionListRenderer.Content>?, context: Context
if (results != null) {
val title = results.header?.runs?.get(0)?.text ?: ""
val content = results.description.runs?.get(0)?.text ?: ""
list.add(
HomeItem(
contents = listOf(
Content(
album = null,
artists = listOf(),
description = content,
isExplicit = null,
playlistId = null,
browseId = null,
thumbnails = listOf(),
title = content,
videoId = null,
views = null
)
), title = title
if (title.isNotEmpty()) {
list.add(
HomeItem(
contents = listOf(
Content(
album = null,
artists = listOf(),
description = content,
isExplicit = null,
playlistId = null,
browseId = null,
thumbnails = listOf(),
title = content,
videoId = null,
views = null
)
), title = title
)
)
)
}
} else {
val results1 = row.musicCarouselShelfRenderer
Log.w("parse_mixed_content", results1.toString())
Expand Down Expand Up @@ -359,15 +361,17 @@ fun parseMixedContent(data: List<SectionListRenderer.Content>?, context: Context
}
}
}
list.add(
HomeItem(
contents = listContent,
title = title,
subtitle = subtitle,
thumbnail = thumbnail,
channelId = if (artistChannelId?.contains("UC") == true) artistChannelId else null
if (title.isNotEmpty()) {
list.add(
HomeItem(
contents = listContent,
title = title,
subtitle = subtitle,
thumbnail = thumbnail,
channelId = if (artistChannelId?.contains("UC") == true) artistChannelId else null
)
)
)
}
Log.w("parse_mixed_content", list.toString())
}
}
Expand Down

0 comments on commit 6a41695

Please sign in to comment.