diff --git a/src/invidious/routes/api/v1/authenticated.cr b/src/invidious/routes/api/v1/authenticated.cr index 738a43de..a57dc405 100644 --- a/src/invidious/routes/api/v1/authenticated.cr +++ b/src/invidious/routes/api/v1/authenticated.cr @@ -482,7 +482,7 @@ module Invidious::Routes::API::V1::Authenticated env.response.content_type = "text/event-stream" raw_topics = env.params.body["topics"]? || env.params.query["topics"]? - topics = raw_topics.try &.split(",").uniq.first(1000) + topics = raw_topics.try &.split(",").uniq!.first(1000) topics ||= [] of String create_notification_stream(env, topics, CONNECTION_CHANNEL) diff --git a/src/invidious/yt_backend/youtube_api.cr b/src/invidious/yt_backend/youtube_api.cr index 6c1c6584..eed2e1a8 100644 --- a/src/invidious/yt_backend/youtube_api.cr +++ b/src/invidious/yt_backend/youtube_api.cr @@ -724,7 +724,7 @@ module YoutubeAPI # Multiple encodings can be combined, and are listed in the order # in which they were applied. E.g: "deflate, gzip" means that the # content must be first "gunzipped", then "defated". - encodings.split(',').reverse.each do |enc| + encodings.split(',').reverse!.each do |enc| case enc.strip(' ') when "gzip" body_io = Compress::Gzip::Reader.new(body_io, sync_close: true)