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.
This commit is contained in:
Samantaz Fox 2024-11-08 18:28:55 +01:00
parent 6dd662a5b8
commit 2a19dbb1fe
No known key found for this signature in database
GPG Key ID: F42821059186176E
1 changed files with 3 additions and 1 deletions

View File

@ -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),
},
}