From 2c1c40249bc2f606e09c18b99b2672c5d97c091f Mon Sep 17 00:00:00 2001 From: Oleksii Holub <1935960+Tyrrrz@users.noreply.github.com> Date: Tue, 21 May 2024 16:37:38 +0300 Subject: [PATCH] Fix extracting own playlist info when authenticated (#791) --- .../Bridge/PlaylistBrowseResponse.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/YoutubeExplode/Bridge/PlaylistBrowseResponse.cs b/YoutubeExplode/Bridge/PlaylistBrowseResponse.cs index 5f88439b..7fa51f8b 100644 --- a/YoutubeExplode/Bridge/PlaylistBrowseResponse.cs +++ b/YoutubeExplode/Bridge/PlaylistBrowseResponse.cs @@ -45,7 +45,14 @@ internal partial class PlaylistBrowseResponse(JsonElement content) : IPlaylistDa ?.EnumerateArrayOrNull() ?.Select(j => j.GetPropertyOrNull("text")?.GetStringOrNull()) .WhereNotNull() - .ConcatToString(); + .ConcatToString() + ?? SidebarPrimary + ?.GetPropertyOrNull("titleForm") + ?.GetPropertyOrNull("inlineFormRenderer") + ?.GetPropertyOrNull("formField") + ?.GetPropertyOrNull("textInputFormFieldRenderer") + ?.GetPropertyOrNull("value") + ?.GetStringOrNull(); [Lazy] private JsonElement? AuthorDetails => @@ -85,7 +92,14 @@ internal partial class PlaylistBrowseResponse(JsonElement content) : IPlaylistDa ?.EnumerateArrayOrNull() ?.Select(j => j.GetPropertyOrNull("text")?.GetStringOrNull()) .WhereNotNull() - .ConcatToString(); + .ConcatToString() + ?? SidebarPrimary + ?.GetPropertyOrNull("descriptionForm") + ?.GetPropertyOrNull("inlineFormRenderer") + ?.GetPropertyOrNull("formField") + ?.GetPropertyOrNull("textInputFormFieldRenderer") + ?.GetPropertyOrNull("value") + ?.GetStringOrNull(); [Lazy] public IReadOnlyList Thumbnails =>