summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2024-11-08 13:33:46 +0100
committerSamantaz Fox <coding@samantaz.fr>2024-11-08 14:00:35 +0100
commitd27a5e7fae4a826b66950422ff8dfec4123dabf1 (patch)
tree13c27ddba753b7453e7d506110c3c3fb005fdd7f
parentafc5b27d83d8b2b287842ed1ec43185135441d37 (diff)
downloadinvidious-d27a5e7fae4a826b66950422ff8dfec4123dabf1.tar.gz
invidious-d27a5e7fae4a826b66950422ff8dfec4123dabf1.tar.bz2
invidious-d27a5e7fae4a826b66950422ff8dfec4123dabf1.zip
Channels: Rename ctoken generator functions as requested
-rw-r--r--src/invidious/channels/videos.cr12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/invidious/channels/videos.cr b/src/invidious/channels/videos.cr
index 7b3e3cfa..9572adf3 100644
--- a/src/invidious/channels/videos.cr
+++ b/src/invidious/channels/videos.cr
@@ -26,7 +26,7 @@ module Invidious::Channel::Tabs
end
def get_videos(author : String, ucid : String, *, continuation : String? = nil, sort_by = "newest")
- continuation ||= make_videos_ctoken(ucid, sort_by)
+ continuation ||= make_initial_videos_ctoken(ucid, sort_by)
initial_data = YoutubeAPI.browse(continuation: continuation)
return extract_items(initial_data, author, ucid)
@@ -56,7 +56,7 @@ module Invidious::Channel::Tabs
# -------------------
def get_shorts(channel : AboutChannel, *, continuation : String? = nil, sort_by = "newest")
- continuation ||= make_shorts_ctoken(channel.ucid, sort_by)
+ continuation ||= make_initial_shorts_ctoken(channel.ucid, sort_by)
initial_data = YoutubeAPI.browse(continuation: continuation)
return extract_items(initial_data, channel.author, channel.ucid)
@@ -67,7 +67,7 @@ module Invidious::Channel::Tabs
# -------------------
def get_livestreams(channel : AboutChannel, *, continuation : String? = nil, sort_by = "newest")
- continuation ||= make_livestreams_ctoken(channel.ucid, sort_by)
+ continuation ||= make_initial_livestreams_ctoken(channel.ucid, sort_by)
initial_data = YoutubeAPI.browse(continuation: continuation)
return extract_items(initial_data, channel.author, channel.ucid)
@@ -108,7 +108,7 @@ module Invidious::Channel::Tabs
# Generate the initial "continuation token" to get the first page of the
# "videos" tab. The following page requires the ctoken provided in that
# first page, and so on.
- private def make_videos_ctoken(ucid : String, sort_by = "newest")
+ private def make_initial_videos_ctoken(ucid : String, sort_by = "newest")
object = {
"15:embedded" => {
"2:string" => "\n$00000000-0000-0000-0000-000000000000",
@@ -122,7 +122,7 @@ module Invidious::Channel::Tabs
# Generate the initial "continuation token" to get the first page of the
# "shorts" tab. The following page requires the ctoken provided in that
# first page, and so on.
- private def make_shorts_ctoken(ucid : String, sort_by = "newest")
+ private def make_initial_shorts_ctoken(ucid : String, sort_by = "newest")
object = {
"10:embedded" => {
"2:embedded" => {
@@ -138,7 +138,7 @@ module Invidious::Channel::Tabs
# Generate the initial "continuation token" to get the first page of the
# "livestreams" tab. The following page requires the ctoken provided in that
# first page, and so on.
- private def make_livestreams_ctoken(ucid : String, sort_by = "newest")
+ private def make_initial_livestreams_ctoken(ucid : String, sort_by = "newest")
sort_by_numerical =
case sort_by
when "newest" then 12_i64