mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-21 02:18:52 +00:00
Merge pull request #2868 from SamantazFox/related-channels-items-fix
Related channel may contain a continuation entry
This commit is contained in:
@@ -96,7 +96,14 @@ module Invidious::Routes::API::V1::Channels
|
||||
|
||||
json.field "relatedChannels" do
|
||||
json.array do
|
||||
fetch_related_channels(channel).each do |related_channel|
|
||||
# Fetch related channels
|
||||
begin
|
||||
related_channels = fetch_related_channels(channel)
|
||||
rescue ex
|
||||
related_channels = [] of AboutRelatedChannel
|
||||
end
|
||||
|
||||
related_channels.each do |related_channel|
|
||||
json.object do
|
||||
json.field "author", related_channel.author
|
||||
json.field "authorId", related_channel.ucid
|
||||
@@ -118,7 +125,8 @@ module Invidious::Routes::API::V1::Channels
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end # relatedChannels
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user