diff --git a/innertube/src/main/java/com/malopieds/innertube/YouTube.kt b/innertube/src/main/java/com/malopieds/innertube/YouTube.kt index 7c3762ff9..bc319f6be 100644 --- a/innertube/src/main/java/com/malopieds/innertube/YouTube.kt +++ b/innertube/src/main/java/com/malopieds/innertube/YouTube.kt @@ -922,6 +922,7 @@ object YouTube { endpoint.params, continuation, ).body() + val title = response.contents.singleColumnMusicWatchNextResultsRenderer.tabbedRenderer.watchNextTabbedResultsRenderer.tabs[0].tabRenderer.content?.musicQueueRenderer?.header?.musicQueueHeaderRenderer?.subtitle?.runs?.firstOrNull()?.text val playlistPanelRenderer = response.continuationContents?.playlistPanelContinuation ?: response.contents.singleColumnMusicWatchNextResultsRenderer.tabbedRenderer.watchNextTabbedResultsRenderer.tabs[0] @@ -940,7 +941,7 @@ object YouTube { ?.let { watchPlaylistEndpoint -> return@runCatching next(watchPlaylistEndpoint).getOrThrow().let { result -> result.copy( - title = playlistPanelRenderer.title, + title = title, items = playlistPanelRenderer.contents.mapNotNull { it.playlistPanelVideoRenderer?.let { renderer -> diff --git a/innertube/src/main/java/com/malopieds/innertube/models/MusicQueueRenderer.kt b/innertube/src/main/java/com/malopieds/innertube/models/MusicQueueRenderer.kt index 40ff0383f..c5c3ee9f7 100644 --- a/innertube/src/main/java/com/malopieds/innertube/models/MusicQueueRenderer.kt +++ b/innertube/src/main/java/com/malopieds/innertube/models/MusicQueueRenderer.kt @@ -5,9 +5,21 @@ import kotlinx.serialization.Serializable @Serializable data class MusicQueueRenderer( val content: Content?, + val header: Header?, ) { @Serializable data class Content( val playlistPanelRenderer: PlaylistPanelRenderer, ) + + @Serializable + data class Header( + val musicQueueHeaderRenderer: MusicQueueHeaderRenderer?, + ) { + @Serializable + data class MusicQueueHeaderRenderer( + val title: Runs?, + val subtitle: Runs?, + ) + } }