Add share button for YouTube albums and playlists
This commit is contained in:
@@ -589,7 +589,8 @@ object YouTube {
|
||||
val authors: List<Info<NavigationEndpoint.Endpoint.Browse>>?,
|
||||
val year: String?,
|
||||
val thumbnail: ThumbnailRenderer.MusicThumbnailRenderer.Thumbnail.Thumbnail?,
|
||||
val items: List<Item>?
|
||||
val items: List<Item>?,
|
||||
val url: String?
|
||||
) {
|
||||
open class Item(
|
||||
val info: Info<NavigationEndpoint.Endpoint.Watch>,
|
||||
@@ -686,7 +687,11 @@ object YouTube {
|
||||
?.firstOrNull()
|
||||
)
|
||||
}
|
||||
?.filter { it.info.endpoint != null }
|
||||
?.filter { it.info.endpoint != null },
|
||||
url = body
|
||||
.microformat
|
||||
?.microformatDataRenderer
|
||||
?.urlCanonical
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,8 @@ import kotlinx.serialization.Serializable
|
||||
@Serializable
|
||||
data class BrowseResponse(
|
||||
val contents: Contents,
|
||||
val header: Header?
|
||||
val header: Header?,
|
||||
val microformat: Microformat?
|
||||
) {
|
||||
@Serializable
|
||||
data class Contents(
|
||||
@@ -46,4 +47,14 @@ data class BrowseResponse(
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Serializable
|
||||
data class Microformat(
|
||||
val microformatDataRenderer: MicroformatDataRenderer?
|
||||
) {
|
||||
@Serializable
|
||||
data class MicroformatDataRenderer(
|
||||
val urlCanonical: String?
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user