diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2021-12-01 20:49:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-01 20:49:23 +0100 |
| commit | 438b334320159343e21f767dd44c366686d5fb25 (patch) | |
| tree | dc1598a75a1e8fd07646dc3a4437d4ee51c24c39 /src | |
| parent | e5557b515ecf73b6053563178273738e9cf2de60 (diff) | |
| parent | 8d4b4cd14c4247f63a6d25dc2f023badc11ab3b5 (diff) | |
| download | invidious-438b334320159343e21f767dd44c366686d5fb25.tar.gz invidious-438b334320159343e21f767dd44c366686d5fb25.tar.bz2 invidious-438b334320159343e21f767dd44c366686d5fb25.zip | |
Merge pull request #2671 from matthewmcgarvey/code-removal
Remove dead code
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/comments.cr | 37 | ||||
| -rw-r--r-- | src/invidious/trending.cr | 10 |
2 files changed, 0 insertions, 47 deletions
diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index ffdce000..22e63d3a 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -60,8 +60,6 @@ def fetch_youtube_comments(id, cursor, format, locale, thin_mode, region, sort_b case cursor when nil, "" ctoken = produce_comment_continuation(id, cursor: "", sort_by: sort_by) - # when .starts_with? "Ug" - # ctoken = produce_comment_reply_continuation(id, video.ucid, cursor) when .starts_with? "ADSJ" ctoken = produce_comment_continuation(id, cursor: cursor, sort_by: sort_by) else @@ -645,38 +643,3 @@ def produce_comment_continuation(video_id, cursor = "", sort_by = "top") return continuation end - -def produce_comment_reply_continuation(video_id, ucid, comment_id) - object = { - "2:embedded" => { - "2:string" => video_id, - "24:varint" => 1_i64, - "25:varint" => 1_i64, - "28:varint" => 1_i64, - "36:embedded" => { - "5:varint" => -1_i64, - "8:varint" => 0_i64, - }, - }, - "3:varint" => 6_i64, - "6:embedded" => { - "3:embedded" => { - "2:string" => comment_id, - "4:embedded" => { - "1:varint" => 0_i64, - }, - "5:string" => ucid, - "6:string" => video_id, - "8:varint" => 1_i64, - "9:varint" => 10_i64, - }, - }, - } - - continuation = object.try { |i| Protodec::Any.cast_json(i) } - .try { |i| Protodec::Any.from_json(i) } - .try { |i| Base64.urlsafe_encode(i) } - .try { |i| URI.encode_www_form(i) } - - return continuation -end diff --git a/src/invidious/trending.cr b/src/invidious/trending.cr index 25bab4d2..1f957081 100644 --- a/src/invidious/trending.cr +++ b/src/invidious/trending.cr @@ -20,13 +20,3 @@ def fetch_trending(trending_type, region, locale) return {trending, plid} end - -def extract_plid(url) - return url.try { |i| URI.parse(i).query } - .try { |i| HTTP::Params.parse(i)["bp"] } - .try { |i| URI.decode_www_form(i) } - .try { |i| Base64.decode(i) } - .try { |i| IO::Memory.new(i) } - .try { |i| Protodec::Any.parse(i) } - .try &.["44:0:embedded"]?.try &.["2:1:string"]?.try &.as_s -end |
