Fix Style/IsAFilter issues
This commit is contained in:
parent
e969c1490a
commit
dd8c412abc
4 changed files with 4 additions and 6 deletions
|
@ -132,8 +132,6 @@ def error_redirect_helper(env : HTTP::Server::Context, locale : Hash(String, JSO
|
|||
</li>
|
||||
</ul>
|
||||
END_HTML
|
||||
|
||||
return next_step_html
|
||||
else
|
||||
return ""
|
||||
end
|
||||
|
|
|
@ -29,7 +29,7 @@ module Invidious::Routes::Channels
|
|||
item.author
|
||||
end
|
||||
end
|
||||
items = items.select(&.is_a?(SearchPlaylist)).map(&.as(SearchPlaylist))
|
||||
items = items.select(SearchPlaylist).map(&.as(SearchPlaylist))
|
||||
items.each(&.author=(""))
|
||||
else
|
||||
sort_options = {"newest", "oldest", "popular"}
|
||||
|
@ -57,7 +57,7 @@ module Invidious::Routes::Channels
|
|||
end
|
||||
|
||||
items, continuation = fetch_channel_playlists(channel.ucid, channel.author, continuation, sort_by)
|
||||
items = items.select { |item| item.is_a?(SearchPlaylist) }.map { |item| item.as(SearchPlaylist) }
|
||||
items = items.select(SearchPlaylist).map { |item| item.as(SearchPlaylist) }
|
||||
items.each(&.author=(""))
|
||||
|
||||
templated "playlists"
|
||||
|
|
|
@ -245,7 +245,7 @@ module Invidious::Routes::Playlists
|
|||
if query
|
||||
begin
|
||||
search_query, count, items, operators = process_search_query(query, page, user, region: nil)
|
||||
videos = items.select { |item| item.is_a? SearchVideo }.map { |item| item.as(SearchVideo) }
|
||||
videos = items.select(SearchVideo).map { |item| item.as(SearchVideo) }
|
||||
rescue ex
|
||||
videos = [] of SearchVideo
|
||||
count = 0
|
||||
|
|
|
@ -40,7 +40,7 @@ def extract_videos(initial_data : Hash(String, JSON::Any), author_fallback : Str
|
|||
target << i
|
||||
end
|
||||
end
|
||||
return target.select(&.is_a?(SearchVideo)).map(&.as(SearchVideo))
|
||||
return target.select(SearchVideo).map(&.as(SearchVideo))
|
||||
end
|
||||
|
||||
def extract_selected_tab(tabs)
|
||||
|
|
Loading…
Reference in a new issue