Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint errors introduced in #4146 and #4295 #4876

Merged
merged 2 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/invidious/channels/about.cr
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ def get_about_info(ucid, locale) : AboutChannel
total_views = 0_i64
joined = 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_s
ucid = initdata.dig("responseContext", "serviceTrackingParams", 0, "params", 0, "value").as_s
author_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_s
banner = nil
is_family_friendly = false
is_age_gated = true
Expand Down
2 changes: 1 addition & 1 deletion src/invidious/routes/search.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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_s
end

Expand Down
2 changes: 1 addition & 1 deletion src/invidious/search/query.cr
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ module Invidious::Search
end

# 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

Expand Down
Loading