mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-16 18:08:52 +00:00
Update to Crystal 0.31.0, resolve compiler deprecation warnings, update dependencies (#764)
* shard: update to crystal 0.31.0 Additionally, no longer use the Crystal "markdown" library which has been removed from the Crystal stdlib in version 0.31.0. See https://github.com/crystal-lang/crystal/pull/8115. Also fix some deprecation warnings using the following commands: find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.escape/URI\.encode_www_form/g' "{}" \; find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.unescape/URI\.decode_www_form/g' "{}" \; sed -i 's/while \%pull\.kind \!\= \:end_object/until \%pull\.kind\.end_object\?/g' src/invidious/helpers/patch_mapping.cr
This commit is contained in:
@@ -573,7 +573,7 @@ def content_to_comment_html(content)
|
||||
end
|
||||
|
||||
def extract_comment_cursor(continuation)
|
||||
continuation = URI.unescape(continuation)
|
||||
continuation = URI.decode_www_form(continuation)
|
||||
data = IO::Memory.new(Base64.decode(continuation))
|
||||
|
||||
# 0x12 0x26
|
||||
@@ -653,7 +653,7 @@ def produce_comment_continuation(video_id, cursor = "", sort_by = "top")
|
||||
end
|
||||
|
||||
continuation = Base64.urlsafe_encode(data)
|
||||
continuation = URI.escape(continuation)
|
||||
continuation = URI.encode_www_form(continuation)
|
||||
|
||||
return continuation
|
||||
end
|
||||
@@ -695,7 +695,7 @@ def produce_comment_reply_continuation(video_id, ucid, comment_id)
|
||||
data.write(Bytes[0x48, 0x0a])
|
||||
|
||||
continuation = Base64.urlsafe_encode(data.to_slice)
|
||||
continuation = URI.escape(continuation)
|
||||
continuation = URI.encode_www_form(continuation)
|
||||
|
||||
return continuation
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user