Open iBicha opened 2 weeks ago
So when reading this playlist I have, the issue is with the parsing of ContentMetadataView
.
Parsing assumes that a ContentMetadataView contains rows, and each row contains parts, and each part is a text
. But in my case I see that a part can be of type AvatarStack
, which seems to be a list of avatars (I assume this is because maybe it is possible, or it will become possible, to collaborate on creating a playlist by multiple people maybe?)
Here's the json of this ContentMetadataView
causing the bug
{
"metadataRows": [
{
"metadataParts": [
{
"avatarStack": {
"avatarStackViewModel": {
"avatars": [
{
"avatarViewModel": {
"image": {
"sources": [
{
"url": "https://yt3.ggpht.com/ytc/redacted",
"width": 48,
"height": 48
}
],
"processor": {
"borderImageProcessor": {
"circular": true
}
}
},
"avatarImageSize": "AVATAR_SIZE_XS"
}
}
],
"text": {
"content": "redacted",
"commandRuns": [
{
"startIndex": 0,
"length": 15,
"onTap": {
"innertubeCommand": {
"clickTrackingParams": "redacted",
"commandMetadata": {
"webCommandMetadata": {
"url": "/@BrahimHadriche",
"webPageType": "WEB_PAGE_TYPE_CHANNEL",
"rootVe": 3611,
"apiUrl": "/youtubei/v1/browse"
}
},
"browseEndpoint": {
"browseId": "redacted",
"canonicalBaseUrl": "redacted"
}
}
}
}
],
"styleRuns": [
{
"startIndex": 0,
"length": 15,
"weightLabel": "FONT_WEIGHT_NORMAL",
"styleRunExtensions": {
"styleRunColorMapExtension": {
"colorMap": [
{
"key": "USER_INTERFACE_THEME_LIGHT",
"value": 4294967295
},
{
"key": "USER_INTERFACE_THEME_DARK",
"value": 4294967295
}
]
}
}
}
]
}
}
}
}
]
},
{
"metadataParts": [
{
"text": {
"content": "9 videos"
}
},
{
"text": {
"content": "Public"
}
}
]
}
]
}
Until now YouTube has only used that node on the channel page, hence the current handling. Sounds like they are switching to that on the playlist page too then.
Thank you for providing the snippet that causes the problem, that will make it easier to add support for it.
Steps to reproduce
Happens when trying to read playlists (I'll dig into this further when I have some time)
This is from yt2alt, usage looks like this
Failure Logs
Expected behavior
Reads videos from playlists
Current behavior
Error printed, but still successfully reads videos (or at least the ids are there)
Version
Default
Anything else?
No response
Checklist