mirror of
https://github.com/iv-org/invidious.git
synced 2024-08-22 20:33:39 +02:00
Reduce block verbosity further
This commit is contained in:
parent
b8f27a42a7
commit
17e481c107
@ -51,7 +51,7 @@ struct PlaylistVideo
|
|||||||
if xml
|
if xml
|
||||||
to_xml(auto_generated, xml)
|
to_xml(auto_generated, xml)
|
||||||
else
|
else
|
||||||
XML.build do |xml| # Why was this `json`?
|
XML.build do |xml|
|
||||||
to_xml(auto_generated, xml)
|
to_xml(auto_generated, xml)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -30,7 +30,7 @@ module Invidious::Routes::Channels
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
items = items.select(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"}
|
||||||
sort_by ||= "newest"
|
sort_by ||= "newest"
|
||||||
@ -58,7 +58,7 @@ module Invidious::Routes::Channels
|
|||||||
|
|
||||||
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(SearchPlaylist).map(&.as(SearchPlaylist))
|
items = items.select(SearchPlaylist).map(&.as(SearchPlaylist))
|
||||||
items.each(&.author=(""))
|
items.each(&.author = "")
|
||||||
|
|
||||||
templated "playlists"
|
templated "playlists"
|
||||||
end
|
end
|
||||||
|
@ -236,7 +236,7 @@ def get_spys_proxies(country_code = "US")
|
|||||||
proxies << {ip: ip, port: port, score: score}
|
proxies << {ip: ip, port: port, score: score}
|
||||||
end
|
end
|
||||||
|
|
||||||
proxies = proxies.sort_by { |proxy| proxy[:score] }.reverse!
|
proxies = proxies.sort_by!(&.[:score]).reverse!
|
||||||
return proxies
|
return proxies
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user