From 575c66efd342af56d3524645f7e3908e7469f56d Mon Sep 17 00:00:00 2001 From: syeopite Date: Sun, 26 Sep 2021 14:34:05 -0700 Subject: [PATCH] Remove extra dot between [] from ambea copy-pasting. --- src/invidious/channels/about.cr | 2 +- src/invidious/helpers/static_file_handler.cr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/invidious/channels/about.cr b/src/invidious/channels/about.cr index a72acc72..c87c53e0 100644 --- a/src/invidious/channels/about.cr +++ b/src/invidious/channels/about.cr @@ -149,7 +149,7 @@ def get_about_info(ucid, locale) end end end - tabs = tabs_json.reject { |node| node["tabRenderer"]?.nil? }.map(&.["tabRenderer"].["title"].as_s.downcase) + tabs = tabs_json.reject { |node| node["tabRenderer"]?.nil? }.map(&.["tabRenderer"]["title"].as_s.downcase) end sub_count = initdata["header"]["c4TabbedHeaderRenderer"]?.try &.["subscriberCountText"]?.try &.["simpleText"]?.try &.as_s? diff --git a/src/invidious/helpers/static_file_handler.cr b/src/invidious/helpers/static_file_handler.cr index 11151874..630c2fd2 100644 --- a/src/invidious/helpers/static_file_handler.cr +++ b/src/invidious/helpers/static_file_handler.cr @@ -173,7 +173,7 @@ module Kemal return end - if @cached_files.sum(&.[1].[:data].bytesize) + (size = File.size(file_path)) < CACHE_LIMIT + if @cached_files.sum(&.[1][:data].bytesize) + (size = File.size(file_path)) < CACHE_LIMIT data = Bytes.new(size) File.open(file_path) do |file| file.read(data)