Invidious is an alternative front-end to YouTube
Allow automatic instance redirect to be turned off
syeopiteb63bebb519c4
diff --git a/locales/ar.json b/locales/ar.jsonindex a14e4101..b12c4cb8 100644--- a/locales/ar.json+++ b/locales/ar.json@@ -86,6 +86,8 @@"dark": "غامق (اسود)","light": "فاتح (ابيض)","Thin mode: ": "الوضع الخفيف: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "تفضيلات الإشتراك","Show annotations by default for subscribed channels: ": "عرض الملاحظات في الفيديوهات تلقائيا في القنوات المشترك بها فقط: ","Redirect homepage to feed: ": "إعادة التوجية من الصفحة الرئيسية لصفحة المشتركين (لرؤية اخر فيديوهات المشتركين): ",@@ -418,4 +420,4 @@"hdr": "وضع التباين العالي","filter": "معامل الفرز","Current version: ": "الإصدار الحالي: "-}+}\ No newline at end of filediff --git a/locales/bn_BD.json b/locales/bn_BD.jsonindex 9b1df424..9de526d5 100644--- a/locales/bn_BD.json+++ b/locales/bn_BD.json@@ -80,6 +80,8 @@"dark": "","light": "","Thin mode: ": "",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "","Show annotations by default for subscribed channels: ": "","Redirect homepage to feed: ": "",diff --git a/locales/cs.json b/locales/cs.jsonindex b85bcd10..3d59466a 100644--- a/locales/cs.json+++ b/locales/cs.json@@ -86,6 +86,8 @@"dark": "tmavý","light": "světlý","Thin mode: ": "Kompaktní režim: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Nastavení předplatných","Show annotations by default for subscribed channels: ": "Ve výchozím nastavení zobrazovat poznámky u odebíraných kanálů: ","Redirect homepage to feed: ": "Přesměrovávat domovskou stránku na informační kanál: ",diff --git a/locales/da.json b/locales/da.jsonindex 525c9d0f..03b176f4 100644--- a/locales/da.json+++ b/locales/da.json@@ -86,6 +86,8 @@"dark": "mørk","light": "lys","Thin mode: ": "Tynd tilstand: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Abonnements præferencer","Show annotations by default for subscribed channels: ": "Vis annotationer som standard for abonnerede kanaler: ","Redirect homepage to feed: ": "Omdiriger startside til feed: ",diff --git a/locales/de.json b/locales/de.jsonindex 2192fd97..606fbeb5 100644--- a/locales/de.json+++ b/locales/de.json@@ -86,6 +86,8 @@"dark": "Nachtmodus","light": "heller Modus","Thin mode: ": "Schlanker Modus: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Abonnementeinstellungen","Show annotations by default for subscribed channels: ": "Anmerkungen für abonnierte Kanäle standardmäßig anzeigen? ","Redirect homepage to feed: ": "Startseite zu Feed umleiten: ",diff --git a/locales/el.json b/locales/el.jsonindex 9192edf3..94611e82 100644--- a/locales/el.json+++ b/locales/el.json@@ -86,6 +86,8 @@"dark": "σκοτεινό","light": "φωτεινό","Thin mode: ": "Ελαφριά λειτουργία: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Προτιμήσεις συνδρομών","Show annotations by default for subscribed channels: ": "Προβολή σημειώσεων μόνο για κανάλια στα οποία είστε συνδρομητής; ","Redirect homepage to feed: ": "Ανακατεύθυνση αρχικής στη ροή συνδρομών: ",diff --git a/locales/en-US.json b/locales/en-US.jsonindex 6d6a88ea..29eae79e 100644--- a/locales/en-US.json+++ b/locales/en-US.json@@ -86,6 +86,8 @@"dark": "dark","light": "light","Thin mode: ": "Thin mode: ",+ "Miscellaneous preferences": "Miscellaneous preferences",+ "Automatically redirect to another Instance: ": "Automatically redirect to another Instance: ","Subscription preferences": "Subscription preferences","Show annotations by default for subscribed channels: ": "Show annotations by default for subscribed channels? ","Redirect homepage to feed: ": "Redirect homepage to feed: ",diff --git a/locales/eo.json b/locales/eo.jsonindex 5528845b..69811006 100644--- a/locales/eo.json+++ b/locales/eo.json@@ -86,6 +86,8 @@"dark": "malhela","light": "hela","Thin mode: ": "Maldika reĝimo: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Abonaj agordoj","Show annotations by default for subscribed channels: ": "Ĉu montri prinotojn defaŭlte por abonitaj kanaloj? ","Redirect homepage to feed: ": "Alidirekti hejmpâgon al fluo: ",diff --git a/locales/es.json b/locales/es.jsonindex fa83d6dc..25329d40 100644--- a/locales/es.json+++ b/locales/es.json@@ -86,6 +86,8 @@"dark": "oscuro","light": "claro","Thin mode: ": "Modo compacto: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Preferencias de la suscripción","Show annotations by default for subscribed channels: ": "¿Mostrar anotaciones por defecto para los canales suscritos? ","Redirect homepage to feed: ": "Redirigir la página de inicio a la fuente: ",diff --git a/locales/eu.json b/locales/eu.jsonindex ec90b82e..426d721f 100644--- a/locales/eu.json+++ b/locales/eu.json@@ -77,6 +77,8 @@"dark": "iluna","light": "argia","Thin mode: ": "",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Harpidetzen hobespenak","Show annotations by default for subscribed channels: ": "","Redirect homepage to feed: ": "",diff --git a/locales/fa.json b/locales/fa.jsonindex 5bc99b60..6b40af62 100644--- a/locales/fa.json+++ b/locales/fa.json@@ -86,6 +86,8 @@"dark": "تاریک","light": "روشن","Thin mode: ": "حالت نازک: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "ترجیحات اشتراک","Show annotations by default for subscribed channels: ": "نمایش حاشیه نویسی ها به طور پیشفرض برای کانال های مشترک شده: ","Redirect homepage to feed: ": "تغییر مسیر صفحه خانه به خوراک: ",diff --git a/locales/fi.json b/locales/fi.jsonindex f4aeae2b..24a4ec36 100644--- a/locales/fi.json+++ b/locales/fi.json@@ -86,6 +86,8 @@"dark": "tumma","light": "vaalea","Thin mode: ": "Kapea tila ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Tilausten asetukset","Show annotations by default for subscribed channels: ": "Näytä oletuksena tilattujen kanavien huomautukset: ","Redirect homepage to feed: ": "Uudelleenohjaa kotisivu syötteeseen: ",diff --git a/locales/fr.json b/locales/fr.jsonindex 21dd2798..75cd2be0 100644--- a/locales/fr.json+++ b/locales/fr.json@@ -87,6 +87,8 @@"light": "clair","Thin mode: ": "Mode léger : ","Subscription preferences": "Préférences des abonnements",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Show annotations by default for subscribed channels: ": "Afficher les annotations par défaut sur les chaînes auxquelles vous êtes abonnés : ","Redirect homepage to feed: ": "Rediriger la page d'accueil vers la page d'abonnements : ","Number of videos shown in feed: ": "Nombre de vidéos affichées dans la page d'abonnements : ",diff --git a/locales/he.json b/locales/he.jsonindex 1645bd93..368a7e08 100644--- a/locales/he.json+++ b/locales/he.json@@ -86,6 +86,8 @@"dark": "כהה","light": "בהיר","Thin mode: ": "",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "העדפות מינויים","Show annotations by default for subscribed channels: ": "Show annotations by default for subscribed channels? ","Redirect homepage to feed: ": "",diff --git a/locales/hr.json b/locales/hr.jsonindex 6c313666..5cadab8f 100644--- a/locales/hr.json+++ b/locales/hr.json@@ -86,6 +86,8 @@"dark": "tamno","light": "svijetlo","Thin mode: ": "Pojednostavljen prikaz: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Postavke pretplata","Show annotations by default for subscribed channels: ": "Standardno prikaži napomene za pretplaćene kanale: ","Redirect homepage to feed: ": "Preusmjeri početnu stranicu na feed: ",diff --git a/locales/hu-HU.json b/locales/hu-HU.jsonindex a25597d5..5c67b4e7 100644--- a/locales/hu-HU.json+++ b/locales/hu-HU.json@@ -77,6 +77,8 @@"dark": "sötét","light": "világos","Thin mode: ": "Vékony mód: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Feliratkozási beállítások","Show annotations by default for subscribed channels: ": "Szövegmagyarázatok mutatása alapértelmezésben feliratkozott csatornák esetében: ","Redirect homepage to feed: ": "Kezdő oldal átirányitása a feed-re: ",diff --git a/locales/id.json b/locales/id.jsonindex 5cf3e65c..0ed116b8 100644--- a/locales/id.json+++ b/locales/id.json@@ -86,6 +86,8 @@"dark": "gelap","light": "terang","Thin mode: ": "Mode tipis: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Preferensi langganan","Show annotations by default for subscribed channels: ": "Tampilkan anotasi secara default untuk kanal langganan: ","Redirect homepage to feed: ": "Arahkan kembali laman beranda ke umpan: ",diff --git a/locales/is.json b/locales/is.jsonindex d80e10e2..d9ec4105 100644--- a/locales/is.json+++ b/locales/is.json@@ -86,6 +86,8 @@"dark": "dimmt","light": "ljóst","Thin mode: ": "Þunnt ham: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Áskriftarstillingar","Show annotations by default for subscribed channels: ": "Á að sýna glósur sjálfgefið fyrir áskriftarrásir? ","Redirect homepage to feed: ": "Endurbeina heimasíðu að straumi: ",diff --git a/locales/it.json b/locales/it.jsonindex e1446f8b..4105e83f 100644--- a/locales/it.json+++ b/locales/it.json@@ -86,6 +86,8 @@"dark": "scuro","light": "chiaro","Thin mode: ": "Modalità per connessioni lente: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Preferenze iscrizioni","Show annotations by default for subscribed channels: ": "Mostrare annotazioni in modo predefinito per i canali sottoscritti: ","Redirect homepage to feed: ": "Reindirizza la pagina principale a quella delle iscrizioni: ",diff --git a/locales/ja.json b/locales/ja.jsonindex 80cbdd81..3c6efb77 100644--- a/locales/ja.json+++ b/locales/ja.json@@ -86,6 +86,8 @@"dark": "ダーク","light": "ライト","Thin mode: ": "最小モード: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "登録チャンネル設定","Show annotations by default for subscribed channels: ": "デフォルトで登録チャンネルのアノテーションを表示しますか? ","Redirect homepage to feed: ": "ホームからフィードにリダイレクト: ",diff --git a/locales/nb-NO.json b/locales/nb-NO.jsonindex 55e0da68..4b5eabd0 100644--- a/locales/nb-NO.json+++ b/locales/nb-NO.json@@ -86,6 +86,8 @@"dark": "Mørk","light": "Lys","Thin mode: ": "Tynt modus: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Abonnementsinnstillinger","Show annotations by default for subscribed channels: ": "Vis merknader som forvalg for kanaler det abonneres på? ","Redirect homepage to feed: ": "Videresend hjemmeside til kilde: ",diff --git a/locales/nl.json b/locales/nl.jsonindex c73952ee..16cdb427 100644--- a/locales/nl.json+++ b/locales/nl.json@@ -86,6 +86,8 @@"dark": "donker","light": "licht","Thin mode: ": "Smalle modus: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Abonnementsinstellingen","Show annotations by default for subscribed channels: ": "Standaard annotaties tonen voor geabonneerde kanalen? ","Redirect homepage to feed: ": "Startpagina omleiden naar feed: ",@@ -418,4 +420,4 @@"hdr": "HDR","filter": "verfijnen","Current version: ": "Huidige versie: "-}+}\ No newline at end of filediff --git a/locales/pl.json b/locales/pl.jsonindex ac170c0a..f8df837c 100644--- a/locales/pl.json+++ b/locales/pl.json@@ -86,6 +86,8 @@"dark": "ciemny","light": "jasny","Thin mode: ": "Tryb minimalny: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Preferencje subskrybcji","Show annotations by default for subscribed channels: ": "Domyślnie wyświetlaj adnotacje dla subskrybowanych kanałów: ","Redirect homepage to feed: ": "Przekieruj stronę główną do subskrybcji: ",diff --git a/locales/pt-BR.json b/locales/pt-BR.jsonindex 8a112a8a..644aa34d 100644--- a/locales/pt-BR.json+++ b/locales/pt-BR.json@@ -86,6 +86,8 @@"dark": "escuro","light": "claro","Thin mode: ": "Modo compacto: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Preferências de inscrições","Show annotations by default for subscribed channels: ": "Sempre mostrar anotações dos vídeos de canais inscritos: ","Redirect homepage to feed: ": "Redirecionar página inicial para o feed: ",diff --git a/locales/pt-PT.json b/locales/pt-PT.jsonindex 4555f870..c02ca58e 100644--- a/locales/pt-PT.json+++ b/locales/pt-PT.json@@ -86,6 +86,8 @@"dark": "escuro","light": "claro","Thin mode: ": "Modo compacto: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Preferências de subscrições","Show annotations by default for subscribed channels: ": "Mostrar sempre anotações aos canais subscritos: ","Redirect homepage to feed: ": "Redirecionar página inicial para subscrições: ",diff --git a/locales/ro.json b/locales/ro.jsonindex e021a622..5c984ab5 100644--- a/locales/ro.json+++ b/locales/ro.json@@ -86,6 +86,8 @@"dark": "întunecat","light": "luminos","Thin mode: ": "Mod lejer: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Preferințele paginii de abonamente","Show annotations by default for subscribed channels: ": "Afișați adnotările în mod implicit pentru canalele la care v-ați abonat: ","Redirect homepage to feed: ": "Redirecționați pagina principală la pagina de abonamente: ",@@ -418,4 +420,4 @@"hdr": "","filter": "","Current version: ": "Versiunea actuală: "-}+}\ No newline at end of filediff --git a/locales/ru.json b/locales/ru.jsonindex db1be8ea..cd29f06a 100644--- a/locales/ru.json+++ b/locales/ru.json@@ -86,6 +86,8 @@"dark": "темная","light": "светлая","Thin mode: ": "Облегчённое оформление: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Настройки подписок","Show annotations by default for subscribed channels: ": "Всегда показывать аннотации в видео каналов, на которые вы подписаны? ","Redirect homepage to feed: ": "Отображать видео с каналов, на которые вы подписаны, как главную страницу: ",@@ -418,4 +420,4 @@"hdr": "","filter": "","Current version: ": "Текущая версия: "-}+}\ No newline at end of filediff --git a/locales/si.json b/locales/si.jsonindex 3ff9b4ed..23cacc1e 100644--- a/locales/si.json+++ b/locales/si.json@@ -86,6 +86,8 @@"dark": "","light": "","Thin mode: ": "",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "","Show annotations by default for subscribed channels: ": "","Redirect homepage to feed: ": "",diff --git a/locales/sk.json b/locales/sk.jsonindex eb696e5b..ed82fae6 100644--- a/locales/sk.json+++ b/locales/sk.json@@ -80,6 +80,8 @@"dark": "tmavá","light": "svetlá","Thin mode: ": "Tenký režim: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Nastavenia predplatného","Show annotations by default for subscribed channels: ": "Predvolene zobraziť anotácie odoberaných kanálov: ","Redirect homepage to feed: ": "Presmerovanie domovskej stránky na informačný kanál: ",diff --git a/locales/sr.json b/locales/sr.jsonindex 76f9fab6..0c64e176 100644--- a/locales/sr.json+++ b/locales/sr.json@@ -86,6 +86,8 @@"dark": "","light": "","Thin mode: ": "",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "","Show annotations by default for subscribed channels: ": "","Redirect homepage to feed: ": "",diff --git a/locales/sr_Cyrl.json b/locales/sr_Cyrl.jsonindex 2f5a5f60..a76684b4 100644--- a/locales/sr_Cyrl.json+++ b/locales/sr_Cyrl.json@@ -77,6 +77,8 @@"dark": "тамна","light": "светла","Thin mode: ": "Узани режим: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Подешавања о праћењима","Show annotations by default for subscribed channels: ": "Увек приказуј анотације за канале које пратим: ","Redirect homepage to feed: ": "Прикажи праћења као почетну страницу: ",diff --git a/locales/sv-SE.json b/locales/sv-SE.jsonindex 8ecc5424..fe12f8d1 100644--- a/locales/sv-SE.json+++ b/locales/sv-SE.json@@ -86,6 +86,8 @@"dark": "Mörkt","light": "Ljust","Thin mode: ": "Lättviktigt läge: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Prenumerationsinställningar","Show annotations by default for subscribed channels: ": "Visa länkar-i-videor som förval för kanaler som prenumereras på? ","Redirect homepage to feed: ": "Omdirigera hemsida till flöde: ",diff --git a/locales/tr.json b/locales/tr.jsonindex 2314b4ab..ca36023a 100644--- a/locales/tr.json+++ b/locales/tr.json@@ -86,6 +86,8 @@"dark": "karanlık","light": "aydınlık","Thin mode: ": "İnce mod: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Abonelik tercihleri","Show annotations by default for subscribed channels: ": "Abone olunan kanallar için ek açıklamaları öntanımlı olarak göster: ","Redirect homepage to feed: ": "Ana sayfayı akışa yönlendir: ",diff --git a/locales/uk.json b/locales/uk.jsonindex ca44e3bb..9e9239d1 100644--- a/locales/uk.json+++ b/locales/uk.json@@ -86,6 +86,8 @@"dark": "темна","light": "Світла","Thin mode: ": "Полегшене оформлення: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "Налаштування підписок","Show annotations by default for subscribed channels: ": "Завжди показувати анотації у відео каналів, на які ви підписані? ","Redirect homepage to feed: ": "Показувати відео з каналів, на які підписані, як головну сторінку: ",@@ -418,4 +420,4 @@"hdr": "","filter": "","Current version: ": "Поточна версія: "-}+}\ No newline at end of filediff --git a/locales/zh-CN.json b/locales/zh-CN.jsonindex 28935e4a..7f58d67c 100644--- a/locales/zh-CN.json+++ b/locales/zh-CN.json@@ -86,6 +86,8 @@"dark": "暗色","light": "亮色","Thin mode: ": "窄页模式: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "订阅设置","Show annotations by default for subscribed channels: ": "默认情况下显示已订阅频道的注释: ","Redirect homepage to feed: ": "跳转主页到 feed: ",diff --git a/locales/zh-TW.json b/locales/zh-TW.jsonindex bdae7678..61a9f118 100644--- a/locales/zh-TW.json+++ b/locales/zh-TW.json@@ -86,6 +86,8 @@"dark": "深色","light": "淺色","Thin mode: ": "精簡模式: ",+ "Miscellaneous preferences": "",+ "Automatically redirect to another Instance: ": "","Subscription preferences": "訂閱偏好設定","Show annotations by default for subscribed channels: ": "預設為已訂閱的頻道顯示註釋: ","Redirect homepage to feed: ": "重新導向首頁至 feed: ",diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.crindex 1f92c4ce..b020d4fe 100644--- a/src/invidious/helpers/helpers.cr+++ b/src/invidious/helpers/helpers.cr@@ -44,6 +44,7 @@ struct ConfigPreferencesproperty quality_dash : String = "auto"property default_home : String? = "Popular"property feed_menu : Array(String) = ["Popular", "Trending", "Subscriptions", "Playlists"]+ property automatic_instance_redirect : Bool = trueproperty related_videos : Bool = trueproperty sort : String = "published"property speed : Float32 = 1.0_f32diff --git a/src/invidious/routes/misc.cr b/src/invidious/routes/misc.crindex 13fc65bb..336f7e33 100644--- a/src/invidious/routes/misc.cr+++ b/src/invidious/routes/misc.cr@@ -37,8 +37,13 @@ class Invidious::Routes::Misc < Invidious::Routes::BaseRouteenddef cross_instance_redirect(env)- instance_url = fetch_random_instancereferer = get_referer(env)++ if !env.get("preferences").as(Preferences).automatic_instance_redirect+ return env.redirect("https://redirect.invidious.io#{referer}")+ end++ instance_url = fetch_random_instanceenv.redirect "https://#{instance_url}#{referer}"endenddiff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.crindex f98c7a5e..20f68aea 100644--- a/src/invidious/routes/preferences.cr+++ b/src/invidious/routes/preferences.cr@@ -92,6 +92,10 @@ class Invidious::Routes::PreferencesRoute < Invidious::Routes::BaseRouteendend+ automatic_instance_redirect = env.params.body["automatic_instance_redirect"]?.try &.as(String)+ automatic_instance_redirect ||= "off"+ automatic_instance_redirect = automatic_instance_redirect == "on"+locale = env.params.body["locale"]?.try &.as(String)locale ||= CONFIG.default_user_preferences.locale@@ -141,6 +145,7 @@ class Invidious::Routes::PreferencesRoute < Invidious::Routes::BaseRoutequality_dash: quality_dash,default_home: default_home,feed_menu: feed_menu,+ automatic_instance_redirect: automatic_instance_redirect,related_videos: related_videos,sort: sort,speed: speed,diff --git a/src/invidious/users.cr b/src/invidious/users.crindex d774ee12..98ef8792 100644--- a/src/invidious/users.cr+++ b/src/invidious/users.cr@@ -36,6 +36,7 @@ struct Preferencesproperty annotations : Bool = CONFIG.default_user_preferences.annotationsproperty annotations_subscribed : Bool = CONFIG.default_user_preferences.annotations_subscribedproperty autoplay : Bool = CONFIG.default_user_preferences.autoplay+ property automatic_instance_redirect : Bool = CONFIG.default_user_preferences.automatic_instance_redirect@[JSON::Field(converter: Preferences::StringToArray)]@[YAML::Field(converter: Preferences::StringToArray)]diff --git a/src/invidious/views/preferences.ecr b/src/invidious/views/preferences.ecrindex 1e1e8cae..bc09ec79 100644--- a/src/invidious/views/preferences.ecr+++ b/src/invidious/views/preferences.ecr@@ -176,6 +176,13 @@<% end %></div>+ <legend><%= translate(locale, "Miscellaneous preferences") %></legend>++ <div class="pure-control-group">+ <label for="automatic_instance_redirect"><%= translate(locale, "Automatically redirect to another Instance: ") %></label>+ <input name="automatic_instance_redirect" id="automatic_instance_redirect" type="checkbox" <% if preferences.automatic_instance_redirect %>checked<% end %>>+ </div>+<% if env.get? "user" %><legend><%= translate(locale, "Subscription preferences") %></legend>