mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-19 04:34:23 -05:00
Fix Style/IsAFilter issues
This commit is contained in:
parent
e969c1490a
commit
dd8c412abc
@ -132,8 +132,6 @@ def error_redirect_helper(env : HTTP::Server::Context, locale : Hash(String, JSO
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
END_HTML
|
END_HTML
|
||||||
|
|
||||||
return next_step_html
|
|
||||||
else
|
else
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
|
@ -29,7 +29,7 @@ module Invidious::Routes::Channels
|
|||||||
item.author
|
item.author
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
items = items.select(&.is_a?(SearchPlaylist)).map(&.as(SearchPlaylist))
|
items = items.select(SearchPlaylist).map(&.as(SearchPlaylist))
|
||||||
items.each(&.author=(""))
|
items.each(&.author=(""))
|
||||||
else
|
else
|
||||||
sort_options = {"newest", "oldest", "popular"}
|
sort_options = {"newest", "oldest", "popular"}
|
||||||
@ -57,7 +57,7 @@ module Invidious::Routes::Channels
|
|||||||
end
|
end
|
||||||
|
|
||||||
items, continuation = fetch_channel_playlists(channel.ucid, channel.author, continuation, sort_by)
|
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=(""))
|
items.each(&.author=(""))
|
||||||
|
|
||||||
templated "playlists"
|
templated "playlists"
|
||||||
|
@ -245,7 +245,7 @@ module Invidious::Routes::Playlists
|
|||||||
if query
|
if query
|
||||||
begin
|
begin
|
||||||
search_query, count, items, operators = process_search_query(query, page, user, region: nil)
|
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
|
rescue ex
|
||||||
videos = [] of SearchVideo
|
videos = [] of SearchVideo
|
||||||
count = 0
|
count = 0
|
||||||
|
@ -40,7 +40,7 @@ def extract_videos(initial_data : Hash(String, JSON::Any), author_fallback : Str
|
|||||||
target << i
|
target << i
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return target.select(&.is_a?(SearchVideo)).map(&.as(SearchVideo))
|
return target.select(SearchVideo).map(&.as(SearchVideo))
|
||||||
end
|
end
|
||||||
|
|
||||||
def extract_selected_tab(tabs)
|
def extract_selected_tab(tabs)
|
||||||
|
Loading…
Reference in New Issue
Block a user