Invidious is an alternative front-end to YouTube
Fix tagging for current branch
Omar Roth32b9c0c84020
diff --git a/src/invidious.cr b/src/invidious.crindex e0967753..9c75de1c 100644--- a/src/invidious.cr+++ b/src/invidious.cr@@ -90,9 +90,9 @@ REDDIT_URL = URI.parse("https://www.reddit.com")LOGIN_URL = URI.parse("https://accounts.google.com")PUBSUB_URL = URI.parse("https://pubsubhubbub.appspot.com")TEXTCAPTCHA_URL = URI.parse("http://textcaptcha.com/[email protected]")+CURRENT_BRANCH = `git branch | sed -n '/\* /s///p'`.stripCURRENT_COMMIT = `git rev-list HEAD --max-count=1 --abbrev-commit`.stripCURRENT_VERSION = `git describe --tags $(git rev-list --tags --max-count=1)`.strip-CURRENT_BRANCH = `git status | head -1`.stripLOCALES = {"ar" => load_locale("ar"),@@ -2536,15 +2536,15 @@ endget "/api/v1/stats" do |env|env.response.content_type = "application/json"- if statistics["error"]?- halt env, status_code: 500, response: statistics.to_json- end-if !config.statistics_enablederror_message = {"error" => "Statistics are not enabled."}.to_jsonhalt env, status_code: 400, response: error_messageend+ if statistics["error"]?+ halt env, status_code: 500, response: statistics.to_json+ end+if env.params.query["pretty"]? && env.params.query["pretty"] == "1"statistics.to_pretty_jsonelse