Skip to content

Commit

Permalink
Merge pull request #455 from kendis1002/fix/spacer-below-recommened-a…
Browse files Browse the repository at this point in the history
…lbum
  • Loading branch information
maxrave-dev authored Aug 22, 2024
2 parents 01256e8 + b96758c commit e9a2f07
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 e9a2f07

Please sign in to comment.