Skip to content

Conversation

@Stypox
Copy link
Member

@Stypox Stypox commented Jul 16, 2025

This PR adds support for the LOCKUP_CONTENT_TYPE_PODCAST lockup view model by reusing the lockup playlist item extractor. The JSON is basically the same as LOCKUP_CONTENT_TYPE_PLAYLIST, I even tried doing a diff and their structure is identical.

JSON
{
  "1": {
    "lockupViewModel": {
      "contentImage": {
        "collectionThumbnailViewModel": {
          "primaryThumbnail": {
            "thumbnailViewModel": {
              "image": {
                "sources": [
                  {
                    "url": "https://i.ytimg.com/pl_c/PLO1kG5YTufOZJSMc9QddoVZhjN1l8egdL/studio_square_thumbnail.jpg?sqp=CMCU3sMG-oaymwEICPABEPABSFqi85f_AwYI6oG9vQY=&rs=AOn4CLApEpZwgLEPcWmMr6_cs6IR5PkXTg",
                    "width": 240,
                    "height": 240
                  },
                  {
                    "url": "https://i.ytimg.com/pl_c/PLO1kG5YTufOZJSMc9QddoVZhjN1l8egdL/studio_square_thumbnail.jpg?sqp=CNKI3sMG-oaymwEICOADEOADSFqi85f_AwYI6oG9vQY=&rs=AOn4CLDpdAz93ci5onCCltBh4kNZqk0w6g",
                    "width": 480,
                    "height": 480
                  },
                  {
                    "url": "https://i.ytimg.com/pl_c/PLO1kG5YTufOZJSMc9QddoVZhjN1l8egdL/studio_square_thumbnail.jpg?sqp=CJis3sMG-oaymwEICNAFENAFSFqi85f_AwYI6oG9vQY=&rs=AOn4CLD9RhKytxnOMuRCIlimhkAT-cvo6A",
                    "width": 720,
                    "height": 720
                  }
                ]
              },
              "overlays": [
                {
                  "thumbnailOverlayBadgeViewModel": {
                    "thumbnailBadges": [
                      {
                        "thumbnailBadgeViewModel": {
                          "icon": {
                            "sources": [
                              {
                                "clientResource": {
                                  "imageName": "BROADCAST"
                                }
                              }
                            ]
                          },
                          "text": "23 episodes",
                          "badgeStyle": "THUMBNAIL_OVERLAY_BADGE_STYLE_DEFAULT",
                          "backgroundColor": {
                            "lightTheme": 2763059,
                            "darkTheme": 2763059
                          }
                        }
                      }
                    ],
                    "position": "THUMBNAIL_OVERLAY_BADGE_POSITION_BOTTOM_END"
                  }
                },
                {
                  "thumbnailHoverOverlayViewModel": {
                    "icon": {
                      "sources": [
                        {
                          "clientResource": {
                            "imageName": "PLAY_ALL"
                          }
                        }
                      ]
                    },
                    "text": {
                      "content": "Play all",
                      "styleRuns": [
                        {
                          "startIndex": 0,
                          "length": 8
                        }
                      ]
                    },
                    "style": "THUMBNAIL_HOVER_OVERLAY_STYLE_COVER"
                  }
                }
              ],
              "backgroundColor": {
                "lightTheme": 2763058,
                "darkTheme": 2763058
              }
            }
          },
          "stackColor": {
            "lightTheme": 8354713,
            "darkTheme": 8486299
          }
        }
      },
      "metadata": {
        "lockupMetadataViewModel": {
          "title": {
            "content": "Кампанія 2 \"Ехо Аркани\" [Записи ігор]"
          },
          "metadata": {
            "contentMetadataViewModel": {
              "metadataRows": [
                {
                  "metadataParts": [
                    {
                      "text": {
                        "content": "View full podcast",
                        "commandRuns": [
                          {
                            "startIndex": 0,
                            "length": 17,
                            "onTap": {
                              "innertubeCommand": {
                                "clickTrackingParams": "REDACTED",
                                "commandMetadata": {
                                  "webCommandMetadata": {
                                    "url": "/playlist?list=PLO1kG5YTufOZJSMc9QddoVZhjN1l8egdL",
                                    "webPageType": "WEB_PAGE_TYPE_PLAYLIST",
                                    "rootVe": 5754,
                                    "apiUrl": "/youtubei/v1/browse"
                                  }
                                },
                                "browseEndpoint": {
                                  "browseId": "VLPLO1kG5YTufOZJSMc9QddoVZhjN1l8egdL"
                                }
                              }
                            }
                          }
                        ],
                        "styleRuns": [
                          {
                            "startIndex": 0,
                            "length": 17,
                            "weightLabel": "FONT_WEIGHT_MEDIUM"
                          }
                        ]
                      }
                    }
                  ]
                }
              ],
              "delimiter": ""
            }
          }
        }
      },
      "contentId": "PLO1kG5YTufOZJSMc9QddoVZhjN1l8egdL",
      "contentType": "LOCKUP_CONTENT_TYPE_PODCAST",
      "rendererContext": {
        "loggingContext": {
          "loggingDirectives": {
            "trackingParams": "REDACTED",
            "visibility": {
              "types": "12"
            }
          }
        },
        "commandContext": {
          "onTap": {
            "innertubeCommand": {
              "clickTrackingParams": "REDACTED",
              "commandMetadata": {
                "webCommandMetadata": {
                  "url": "/watch?v=CKX4TlQS-Ug&list=PLO1kG5YTufOZJSMc9QddoVZhjN1l8egdL&pp=0gcJCV8EOCosWNin",
                  "webPageType": "WEB_PAGE_TYPE_WATCH",
                  "rootVe": 3832
                }
              },
              "watchEndpoint": {
                "videoId": "CKX4TlQS-Ug",
                "playlistId": "PLO1kG5YTufOZJSMc9QddoVZhjN1l8egdL",
                "params": "OAI%3D",
                "playerParams": "REDACTED",
                "loggingContext": {
                  "vssLoggingContext": {
                    "serializedContextData": "REDACTED"
                  }
                },
                "watchEndpointSupportedOnesieConfig": {
                  "html5PlaybackOnesieConfig": {
                    "commonConfig": {
                      "url": "REDACTED"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

While I was at it, I also made LOCKUP_CONTENT_TYPE_VIDEO (#1320) work in other places in the app (not just recommended videos), just in case they'll start using it more in the future.

Here is a testing APK: app-debug.zip

Before (NewPipe) After (NewPipe) On YouTube
NewPipe NewPipe YouTube

Fixes TeamNewPipe/NewPipe#12321

Also extend support for LOCKUP_CONTENT_TYPE_VIDEO
@Stypox Stypox added this to v0.28.x Jul 16, 2025
@github-project-automation github-project-automation bot moved this to Todo in v0.28.x Jul 16, 2025
@Stypox Stypox moved this from Todo to In Progress in v0.28.x Jul 16, 2025
@TobiGr TobiGr added youtube service, https://www.youtube.com/ enhancement New feature or request labels Jul 16, 2025
@TobiGr TobiGr merged commit 68b4c9a into TeamNewPipe:dev Jul 16, 2025
3 of 4 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in v0.28.x Jul 16, 2025
@Stypox Stypox deleted the lockup-podcast branch July 16, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request youtube service, https://www.youtube.com/

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[YouTube] Podcasts in playlists channel tabs are not extracted

3 participants