diff options
| author | matthewmcgarvey <matthewmcgarvey14@gmail.com> | 2021-11-27 23:36:31 -0600 |
|---|---|---|
| committer | matthewmcgarvey <matthewmcgarvey14@gmail.com> | 2021-11-29 09:11:50 -0600 |
| commit | 8d4b4cd14c4247f63a6d25dc2f023badc11ab3b5 (patch) | |
| tree | 29253a611a43ff3ea482fd3a4769f7c90788ee0c /src | |
| parent | 50bb5918264ed5565fe40d9183823d92aa593f5f (diff) | |
| download | invidious-8d4b4cd14c4247f63a6d25dc2f023badc11ab3b5.tar.gz invidious-8d4b4cd14c4247f63a6d25dc2f023badc11ab3b5.tar.bz2 invidious-8d4b4cd14c4247f63a6d25dc2f023badc11ab3b5.zip | |
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 |
