Quick fix for channel videos page bug (#3718)

This commit is contained in:
Samantaz Fox 2023-03-31 22:28:11 +02:00
commit 562d75a47b
No known key found for this signature in database
GPG key ID: F42821059186176E
2 changed files with 4 additions and 1 deletions

View file

@ -30,7 +30,9 @@ def produce_channel_videos_continuation(ucid, page = 1, auto_generated = nil, so
"15:embedded" => { "15:embedded" => {
"1:embedded" => { "1:embedded" => {
"1:string" => object_inner_2_encoded, "1:string" => object_inner_2_encoded,
"2:string" => "00000000-0000-0000-0000-000000000000", },
"2:embedded" => {
"1:string" => "00000000-0000-0000-0000-000000000000",
}, },
"3:varint" => sort_by_numerical, "3:varint" => sort_by_numerical,
}, },

View file

@ -773,6 +773,7 @@ end
def extract_items(initial_data : InitialData, &block) def extract_items(initial_data : InitialData, &block)
if unpackaged_data = initial_data["contents"]?.try &.as_h if unpackaged_data = initial_data["contents"]?.try &.as_h
elsif unpackaged_data = initial_data["response"]?.try &.as_h elsif unpackaged_data = initial_data["response"]?.try &.as_h
elsif unpackaged_data = initial_data.dig?("onResponseReceivedActions", 1).try &.as_h
elsif unpackaged_data = initial_data.dig?("onResponseReceivedActions", 0).try &.as_h elsif unpackaged_data = initial_data.dig?("onResponseReceivedActions", 0).try &.as_h
else else
unpackaged_data = initial_data unpackaged_data = initial_data