From aaefa386029c39cd8f7a052bbfd6a338178c47fb Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Sun, 21 Mar 2021 16:05:50 +0100 Subject: [PATCH] Make the linter happy --- src/invidious/helpers/youtube_api.cr | 6 +++--- src/invidious/playlists.cr | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/invidious/helpers/youtube_api.cr b/src/invidious/helpers/youtube_api.cr index 0ae80318..30413532 100644 --- a/src/invidious/helpers/youtube_api.cr +++ b/src/invidious/helpers/youtube_api.cr @@ -11,9 +11,9 @@ def request_youtube_api_browse(continuation) data = { "context": { "client": { - "hl": "en", - "gl": "US", - "clientName": "WEB", + "hl": "en", + "gl": "US", + "clientName": "WEB", "clientVersion": HARDCODED_CLIENT_VERS, }, }, diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr index 508dc760..71f6a9b8 100644 --- a/src/invidious/playlists.cr +++ b/src/invidious/playlists.cr @@ -315,14 +315,14 @@ def produce_playlist_continuation(id, index) # Emulate a "request counter" increment, to make perfectly valid # ctokens, even if at the time of writing, it's ignored by youtube. - request_count = (index / 100).to_i64 || 1_i64 + request_count = (index / 100).to_i64 || 1_i64 data = {"1:varint" => index.to_i64} .try { |i| Protodec::Any.cast_json(i) } .try { |i| Protodec::Any.from_json(i) } .try { |i| Base64.urlsafe_encode(i, padding: false) } - data_wrapper = { "1:varint" => request_count, "15:string" => "PT:#{data}" } + data_wrapper = {"1:varint" => request_count, "15:string" => "PT:#{data}"} .try { |i| Protodec::Any.cast_json(i) } .try { |i| Protodec::Any.from_json(i) } .try { |i| Base64.urlsafe_encode(i) } @@ -330,8 +330,8 @@ def produce_playlist_continuation(id, index) object = { "80226972:embedded" => { - "2:string" => plid, - "3:string" => data_wrapper, + "2:string" => plid, + "3:string" => data_wrapper, "35:string" => id, }, }