mirror of
https://github.com/iv-org/invidious.git
synced 2026-01-28 07:48:31 -06:00
Fix Lint/ElseNil type of Ameba issues
This commit is contained in:
parent
2112ee674e
commit
a6ade56756
@ -137,7 +137,6 @@ module Invidious::Frontend::Comments
|
||||
<div id="skip-#{child["commentId"]}"></div>
|
||||
</section>
|
||||
END_HTML
|
||||
else nil # Ignore
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -108,7 +108,6 @@ def decode_date(string : String)
|
||||
return Time.utc
|
||||
when "yesterday"
|
||||
return Time.utc - 1.day
|
||||
else nil # Continue
|
||||
end
|
||||
|
||||
# String matches format "20 hours ago", "4 months ago", "20s ago", "15min ago"...
|
||||
|
||||
@ -119,7 +119,6 @@ module Invidious::Routes::Embed
|
||||
end
|
||||
|
||||
return env.redirect url
|
||||
else nil # Continue
|
||||
end
|
||||
|
||||
params = process_video_params(env.params.query, preferences)
|
||||
|
||||
@ -322,7 +322,6 @@ module Invidious::Routes::Feeds
|
||||
request_target = URI.parse(node[attribute.name]).request_target
|
||||
query_string_opt = request_target.starts_with?("/watch?v=") ? "&#{params}" : ""
|
||||
node[attribute.name] = "#{HOST_URL}#{request_target}#{query_string_opt}"
|
||||
else nil # Skip
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -347,7 +347,6 @@ module Invidious::Routes::PreferencesRoute
|
||||
response: error_template(415, "Uploaded file is too large")
|
||||
)
|
||||
end
|
||||
else nil # Ignore
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -45,7 +45,6 @@ def get_subscription_feed(user, max_results = 40, page = 1)
|
||||
notifications.sort_by!(&.author)
|
||||
when "channel name - reverse"
|
||||
notifications.sort_by!(&.author).reverse!
|
||||
else nil # Ignore
|
||||
end
|
||||
else
|
||||
if user.preferences.latest_only
|
||||
@ -94,7 +93,6 @@ def get_subscription_feed(user, max_results = 40, page = 1)
|
||||
videos.sort_by!(&.author)
|
||||
when "channel name - reverse"
|
||||
videos.sort_by!(&.author).reverse!
|
||||
else nil # Ignore
|
||||
end
|
||||
|
||||
notifications = Invidious::Database::Users.select_notifications(user)
|
||||
|
||||
@ -152,7 +152,6 @@ private module Parsers
|
||||
when "Premium"
|
||||
# TODO: Potentially available as item_contents["topStandaloneBadge"]["metadataBadgeRenderer"]
|
||||
badges |= VideoBadges::Premium
|
||||
else nil # Ignore
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -24,8 +24,6 @@ def extract_text(item : JSON::Any?) : String?
|
||||
return text_container.as_s
|
||||
elsif text_container = item["runs"]?
|
||||
return text_container.as_a.map(&.["text"].as_s).join("")
|
||||
else
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user