Skip to content

Commit

Permalink
fix(playlists): closes Malopieds#95
Browse files Browse the repository at this point in the history
  • Loading branch information
Malopieds committed May 17, 2024
1 parent 729432a commit 23cdebe
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@ data class PlaylistPage(
)
} ?: return null,
album = renderer.flexColumns.getOrNull(2)?.musicResponsiveListItemFlexColumnRenderer?.text?.runs?.firstOrNull()?.let {
Album(
name = it.text,
id = it.navigationEndpoint?.browseEndpoint?.browseId ?: return null
)
val browseId = it.navigationEndpoint?.browseEndpoint?.browseId
if (browseId != null) {
Album(
name = it.text,
id = browseId
)
} else {
null
}
},
duration = renderer.fixedColumns?.firstOrNull()?.musicResponsiveListItemFlexColumnRenderer?.text?.runs?.firstOrNull()?.text?.parseTime(),
thumbnail = renderer.thumbnail?.musicThumbnailRenderer?.getThumbnailUrl() ?: return null,
Expand Down

0 comments on commit 23cdebe

Please sign in to comment.