mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-18 06:35:49 -04:00
Fix for channel live videos
This commit is contained in:
parent
d8b893e9ad
commit
5c35c39ee8
@ -146,10 +146,13 @@ module Invidious::Channel::Tabs
|
||||
# -------------------
|
||||
|
||||
def get_livestreams(channel : AboutChannel, continuation : String? = nil, sort_by = "newest")
|
||||
continuation ||= make_initial_content_ctoken(channel.ucid, "livestreams", sort_by)
|
||||
|
||||
initial_data = YoutubeAPI.browse(continuation: continuation)
|
||||
|
||||
if continuation.nil?
|
||||
# EgdzdHJlYW1z8gYECgJ6AA%3D%3D is the protobuf object to load "streams"
|
||||
# TODO: try to extract the continuation tokens that allows other sorting options
|
||||
initial_data = YoutubeAPI.browse(channel.ucid, params: "EgdzdHJlYW1z8gYECgJ6AA%3D%3D")
|
||||
else
|
||||
initial_data = YoutubeAPI.browse(continuation: continuation)
|
||||
end
|
||||
return extract_items(initial_data, channel.author, channel.ucid)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user