summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsyeopite <syeopite@syeopite.dev>2021-09-26 14:58:48 -0700
committersyeopite <syeopite@syeopite.dev>2021-10-25 01:14:14 -0700
commit17e481c10720b273745d222770e2cc86edc608fc (patch)
tree1f7b5a7f0caeb365b1780b297321d569ae108b2c
parentb8f27a42a75169c22c3fec5e24555fffcd29c499 (diff)
downloadinvidious-17e481c10720b273745d222770e2cc86edc608fc.tar.gz
invidious-17e481c10720b273745d222770e2cc86edc608fc.tar.bz2
invidious-17e481c10720b273745d222770e2cc86edc608fc.zip
Reduce block verbosity further
-rw-r--r--src/invidious/playlists.cr2
-rw-r--r--src/invidious/routes/channels.cr4
-rw-r--r--src/invidious/yt_backend/proxy.cr2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr
index 70c74eb3..443d19d7 100644
--- a/src/invidious/playlists.cr
+++ b/src/invidious/playlists.cr
@@ -51,7 +51,7 @@ struct PlaylistVideo
if xml
to_xml(auto_generated, xml)
else
- XML.build do |xml| # Why was this `json`?
+ XML.build do |xml|
to_xml(auto_generated, xml)
end
end
diff --git a/src/invidious/routes/channels.cr b/src/invidious/routes/channels.cr
index 13beca17..29748cd0 100644
--- a/src/invidious/routes/channels.cr
+++ b/src/invidious/routes/channels.cr
@@ -30,7 +30,7 @@ module Invidious::Routes::Channels
end
end
items = items.select(SearchPlaylist).map(&.as(SearchPlaylist))
- items.each(&.author=(""))
+ items.each(&.author = "")
else
sort_options = {"newest", "oldest", "popular"}
sort_by ||= "newest"
@@ -58,7 +58,7 @@ module Invidious::Routes::Channels
items, continuation = fetch_channel_playlists(channel.ucid, channel.author, continuation, sort_by)
items = items.select(SearchPlaylist).map(&.as(SearchPlaylist))
- items.each(&.author=(""))
+ items.each(&.author = "")
templated "playlists"
end
diff --git a/src/invidious/yt_backend/proxy.cr b/src/invidious/yt_backend/proxy.cr
index e150d887..2d0fd4ba 100644
--- a/src/invidious/yt_backend/proxy.cr
+++ b/src/invidious/yt_backend/proxy.cr
@@ -236,7 +236,7 @@ def get_spys_proxies(country_code = "US")
proxies << {ip: ip, port: port, score: score}
end
- proxies = proxies.sort_by { |proxy| proxy[:score] }.reverse!
+ proxies = proxies.sort_by!(&.[:score]).reverse!
return proxies
end