summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2024-11-08 18:28:55 +0100
committerSamantaz Fox <coding@samantaz.fr>2024-11-08 18:28:58 +0100
commit2a19dbb1fee20e5438751c3bb387f8757f4c2238 (patch)
treee8dc4e09906b673b90c8c9b11065a9b2d9144736
parent6dd662a5b84b3deb9e19e365f8b480357f63a2e9 (diff)
downloadinvidious-2a19dbb1fee20e5438751c3bb387f8757f4c2238.tar.gz
invidious-2a19dbb1fee20e5438751c3bb387f8757f4c2238.tar.bz2
invidious-2a19dbb1fee20e5438751c3bb387f8757f4c2238.zip
Channels: Use the same structure as in the other ctoken functions
Change explanation, courtesy of iBicha: The \n is basically a decimal 10, which is 1010 binary. That is a field number 1, and a wire type 2 (length-delimited). Then the $ is a decimal 36, which is exactly the length of 00000000-0000-0000-0000-000000000000. So both objects end up being encoded into the same data.
-rw-r--r--src/invidious/channels/videos.cr4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/invidious/channels/videos.cr b/src/invidious/channels/videos.cr
index 9572adf3..96400f47 100644
--- a/src/invidious/channels/videos.cr
+++ b/src/invidious/channels/videos.cr
@@ -111,7 +111,9 @@ module Invidious::Channel::Tabs
private def make_initial_videos_ctoken(ucid : String, sort_by = "newest")
object = {
"15:embedded" => {
- "2:string" => "\n$00000000-0000-0000-0000-000000000000",
+ "2:embedded" => {
+ "1:string" => "00000000-0000-0000-0000-000000000000",
+ },
"4:varint" => sort_options_videos_short(sort_by),
},
}