From a0583acd54b4d08742c4f84929aadc714d16f9ae Mon Sep 17 00:00:00 2001 From: Fijxu Date: Fri, 12 Sep 2025 23:42:43 -0300 Subject: [PATCH] run crystal tool format --- src/invidious.cr | 12 ++++++------ src/invidious/routes/preferences.cr | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 793cfc2e..93154b25 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -58,7 +58,7 @@ end # Simple alias to make code easier to read alias IV = Invidious -CONFIG = Config.load +CONFIG = Config.load HMAC_KEY = CONFIG.hmac_key PG_DB = begin @@ -68,12 +68,12 @@ rescue ex puts "Check your 'config.yml' database settings or PostgreSQL settings." exit(1) end -ARCHIVE_URL = URI.parse("https://archive.org") -PUBSUB_URL = URI.parse("https://pubsubhubbub.appspot.com") -REDDIT_URL = URI.parse("https://www.reddit.com") -YT_URL = URI.parse("https://www.youtube.com") +ARCHIVE_URL = URI.parse("https://archive.org") +PUBSUB_URL = URI.parse("https://pubsubhubbub.appspot.com") +REDDIT_URL = URI.parse("https://www.reddit.com") +YT_URL = URI.parse("https://www.youtube.com") PUBSUB_HOST_URL = CONFIG.pubsub_domain -HOST_URL = make_host_url(Kemal.config) +HOST_URL = make_host_url(Kemal.config) CHARS_SAFE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" TEST_IDS = {"AgbeGFYluEA", "BaW_jenozKc", "a9LDPn-MO4I", "ddFvjfvPnqk", "iqKdEhx-dD4"} diff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.cr index 26f1287a..fd7399c4 100644 --- a/src/invidious/routes/preferences.cr +++ b/src/invidious/routes/preferences.cr @@ -173,7 +173,6 @@ module Invidious::Routes::PreferencesRoute default_trending_type = env.params.body["default_trending_type"]?.try &.as(String) default_trending_type ||= Invidious::Routes::Feeds::TrendingTypes::Default - # Convert to JSON and back again to take advantage of converters used for compatibility preferences = Preferences.from_json({ annotations: annotations,