Invidious is an alternative front-end to YouTube
Fix lint errors introduced in #4146 and #4295 (#4876)
syeopiteccecc6d318ea
diff --git a/src/invidious/channels/about.cr b/src/invidious/channels/about.crindex 1380044a..13909527 100644--- a/src/invidious/channels/about.cr+++ b/src/invidious/channels/about.cr@@ -50,12 +50,12 @@ def get_about_info(ucid, locale) : AboutChanneltotal_views = 0_i64joined = Time.unix(0)- if ageGate = initdata.dig?("contents", "twoColumnBrowseResultsRenderer", "tabs", 0, "tabRenderer", "content", "sectionListRenderer", "contents", 0, "channelAgeGateRenderer")+ if age_gate_renderer = initdata.dig?("contents", "twoColumnBrowseResultsRenderer", "tabs", 0, "tabRenderer", "content", "sectionListRenderer", "contents", 0, "channelAgeGateRenderer")description_node = nil- author = ageGate["channelTitle"].as_s+ author = age_gate_renderer["channelTitle"].as_sucid = initdata.dig("responseContext", "serviceTrackingParams", 0, "params", 0, "value").as_sauthor_url = "https://www.youtube.com/channel/#{ucid}"- author_thumbnail = ageGate.dig("avatar", "thumbnails", 0, "url").as_s+ author_thumbnail = age_gate_renderer.dig("avatar", "thumbnails", 0, "url").as_sbanner = nilis_family_friendly = falseis_age_gated = truediff --git a/src/invidious/routes/search.cr b/src/invidious/routes/search.crindex 85aa1c7e..44970922 100644--- a/src/invidious/routes/search.cr+++ b/src/invidious/routes/search.cr@@ -53,7 +53,7 @@ module Invidious::Routes::Search# An URL was copy/pasted in the search box.# Redirect the user to the appropriate page.- if query.is_url?+ if query.url?return env.redirect UrlSanitizer.process(query.text).to_senddiff --git a/src/invidious/search/query.cr b/src/invidious/search/query.crindex a93bb3f9..c8e8cf7f 100644--- a/src/invidious/search/query.cr+++ b/src/invidious/search/query.cr@@ -149,7 +149,7 @@ module Invidious::Searchend# Checks if the query is a standalone URL- def is_url? : Bool+ def url? : Bool# If the smart features have been inhibited, don't go further.return false if @inhibit_ssf