Fix Style/IsAFilter issues

pull/2428/head
syeopite 2021-09-24 19:57:46 -07:00
rodzic e969c1490a
commit dd8c412abc
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6FA616E5A5294A82
4 zmienionych plików z 4 dodań i 6 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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"

Wyświetl plik

@ -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

Wyświetl plik

@ -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)