A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
fix(unfurl): log why YouTube rejects the API key (#3696)
Hampus663cddaae26f
diff --git a/fluxer_admin/src/templates/pages/instance_config/integrations.rs b/fluxer_admin/src/templates/pages/instance_config/integrations.rsindex 8e71b8604..f864c205e 100644--- a/fluxer_admin/src/templates/pages/instance_config/integrations.rs+++ b/fluxer_admin/src/templates/pages/instance_config/integrations.rs@@ -120,6 +120,10 @@ pub(super) fn integrations_config_section((secret_badge("API key", integrations.youtube.api_key_set))}(password_input("integration_youtube_api_key", "YouTube API key", Some("Leave blank to keep the current key.")))+ p class="text-xs text-neutral-500" {+ "The key needs YouTube Data API v3 enabled and a daily quota above 0. \+ Restrict it by IP address or not at all. Website restrictions block it."+ }}@if account_identity.is_username() {diff --git a/fluxer_app/src/features/app/components/setup/SetupServicesStep.tsx b/fluxer_app/src/features/app/components/setup/SetupServicesStep.tsxindex 353982b41..1f32c915e 100644--- a/fluxer_app/src/features/app/components/setup/SetupServicesStep.tsx+++ b/fluxer_app/src/features/app/components/setup/SetupServicesStep.tsx@@ -33,8 +33,10 @@ const YOUTUBE_KEY_LABEL_DESCRIPTOR = msg({comment: 'Label for the YouTube Data API key field. YouTube Data API is a product name.',});const YOUTUBE_KEY_HELP_DESCRIPTOR = msg({- message: 'Shows the title and thumbnail when someone posts a YouTube link.',- comment: 'Help under the YouTube Data API key field in the setup wizard.',+ message:+ 'Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it.',+ comment:+ 'Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.',});const KEY_ALREADY_SET_DESCRIPTOR = msg({message: 'Already set up',diff --git a/fluxer_app/src/features/i18n/locales/ar/messages.po b/fluxer_app/src/features/i18n/locales/ar/messages.poindex 29dfb1ccb..b1999d20c 100644--- a/fluxer_app/src/features/i18n/locales/ar/messages.po+++ b/fluxer_app/src/features/i18n/locales/ar/messages.po@@ -33464,10 +33464,10 @@ msgstr "يظهر فقط عندما تكون شارة Visionary ظاهرة وغيmsgid "Shows the banner in its own section below the community header."msgstr "يعرض اللافتة في قسم خاص بها أسفل رأس المجتمع."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "يعرض العنوان والصورة المصغرة عندما ينشر أحدهم رابط YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "يعرض العنوان والصورة المصغرة عندما ينشر أحدهم رابط YouTube. فعّل YouTube Data API v3 بحصة يومية أكبر من 0. قيّد المفتاح حسب عنوان IP أو اتركه دون قيود. قيود المواقع الإلكترونية تحظره."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/bg/messages.po b/fluxer_app/src/features/i18n/locales/bg/messages.poindex c8839b3c3..e8f374f06 100644--- a/fluxer_app/src/features/i18n/locales/bg/messages.po+++ b/fluxer_app/src/features/i18n/locales/bg/messages.po@@ -33464,10 +33464,10 @@ msgstr "Показва се само когато значката ти Visionarmsgid "Shows the banner in its own section below the community header."msgstr "Показва банера в собствен раздел под заглавката на общността."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Показва заглавието и миниатюрата, когато някой публикува връзка към YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Показва заглавието и миниатюрата, когато някой публикува връзка към YouTube. Включи YouTube Data API v3 с дневна квота над 0. Ограничи ключа по IP адрес или не го ограничавай. Ограниченията по уебсайт го блокират."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/cs/messages.po b/fluxer_app/src/features/i18n/locales/cs/messages.poindex 757011167..31202b2d0 100644--- a/fluxer_app/src/features/i18n/locales/cs/messages.po+++ b/fluxer_app/src/features/i18n/locales/cs/messages.po@@ -33464,10 +33464,10 @@ msgstr "Zobrazuje se jen tehdy, když je váš odznak Visionary viditelný a nenmsgid "Shows the banner in its own section below the community header."msgstr "Zobrazí banner v samostatné sekci pod záhlavím komunity."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Zobrazí název a náhledový obrázek, když někdo pošle odkaz na YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Zobrazí název a náhledový obrázek, když někdo pošle odkaz na YouTube. Zapněte YouTube Data API v3 s denní kvótou vyšší než 0. Omezte klíč podle IP adresy, nebo ho neomezujte vůbec. Omezení podle webů ho blokuje."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/da/messages.po b/fluxer_app/src/features/i18n/locales/da/messages.poindex 55994094a..b2b2b2dce 100644--- a/fluxer_app/src/features/i18n/locales/da/messages.po+++ b/fluxer_app/src/features/i18n/locales/da/messages.po@@ -33464,10 +33464,10 @@ msgstr "Vises kun, når dit Visionary-badge er synligt og ikke vises som et abonmsgid "Shows the banner in its own section below the community header."msgstr "Viser banneret i sin egen sektion under fællesskabsoverskriften."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Viser titel og miniature, når nogen deler et YouTube-link."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Viser titel og miniature, når nogen deler et YouTube-link. Aktivér YouTube Data API v3 med en daglig kvote over 0. Begræns nøglen efter IP-adresse eller slet ikke. Begrænsninger efter websted blokerer den."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/de/messages.po b/fluxer_app/src/features/i18n/locales/de/messages.poindex 335338ad3..63087764d 100644--- a/fluxer_app/src/features/i18n/locales/de/messages.po+++ b/fluxer_app/src/features/i18n/locales/de/messages.po@@ -33464,10 +33464,10 @@ msgstr "Wird nur angezeigt, wenn dein Visionary-Abzeichen sichtbar und nicht alsmsgid "Shows the banner in its own section below the community header."msgstr "Zeigt das Banner in einem eigenen Bereich unterhalb des Community-Headers an."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Zeigt Titel und Vorschaubild, wenn jemand einen YouTube-Link postet."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Zeigt Titel und Vorschaubild, wenn jemand einen YouTube-Link postet. Aktiviere YouTube Data API v3 mit einem Tageskontingent über 0. Beschränke den Schlüssel nach IP-Adresse oder gar nicht. Website-Beschränkungen blockieren ihn."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/el/messages.po b/fluxer_app/src/features/i18n/locales/el/messages.poindex 946845667..9ab2936f8 100644--- a/fluxer_app/src/features/i18n/locales/el/messages.po+++ b/fluxer_app/src/features/i18n/locales/el/messages.po@@ -33464,10 +33464,10 @@ msgstr "Εμφανίζεται μόνο όταν το σήμα Visionary σαςmsgid "Shows the banner in its own section below the community header."msgstr "Εμφανίζει το banner στη δική του ενότητα κάτω από την κεφαλίδα της κοινότητας."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Εμφανίζει τον τίτλο και τη μικρογραφία όταν κάποιος δημοσιεύει σύνδεσμο YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Εμφανίζει τον τίτλο και τη μικρογραφία όταν κάποιος δημοσιεύει σύνδεσμο YouTube. Ενεργοποιήστε το YouTube Data API v3 με ημερήσιο όριο πάνω από 0. Περιορίστε το κλειδί ανά διεύθυνση IP ή καθόλου. Οι περιορισμοί ιστοτόπων το μπλοκάρουν."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/en-GB/messages.po b/fluxer_app/src/features/i18n/locales/en-GB/messages.poindex f5b199e8d..515806974 100644--- a/fluxer_app/src/features/i18n/locales/en-GB/messages.po+++ b/fluxer_app/src/features/i18n/locales/en-GB/messages.po@@ -33464,10 +33464,10 @@ msgstr "Shown only when your Visionary badge is visible and not masked."msgid "Shows the banner in its own section below the community header."msgstr "Shows the banner in its own section below the community header."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Shows the title and thumbnail when someone posts a YouTube link."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/en-US/messages.po b/fluxer_app/src/features/i18n/locales/en-US/messages.poindex f181b81cc..f24129e5d 100644--- a/fluxer_app/src/features/i18n/locales/en-US/messages.po+++ b/fluxer_app/src/features/i18n/locales/en-US/messages.po@@ -33464,10 +33464,10 @@ msgstr "Shown only when your Visionary badge is visible and not masked."msgid "Shows the banner in its own section below the community header."msgstr "Shows the banner in its own section below the community header."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Shows the title and thumbnail when someone posts a YouTube link."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/es-419/messages.po b/fluxer_app/src/features/i18n/locales/es-419/messages.poindex 4d90beaeb..f6397d598 100644--- a/fluxer_app/src/features/i18n/locales/es-419/messages.po+++ b/fluxer_app/src/features/i18n/locales/es-419/messages.po@@ -33464,10 +33464,10 @@ msgstr "Solo se muestra cuando tu insignia Visionary está visible y no se muestmsgid "Shows the banner in its own section below the community header."msgstr "Muestra el banner en su propia sección debajo del encabezado de la comunidad."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Muestra el título y la miniatura cuando alguien publica un enlace de YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Muestra el título y la miniatura cuando alguien publica un enlace de YouTube. Activa YouTube Data API v3 con una cuota diaria mayor que 0. Restringe la clave por dirección IP o no la restrinjas. Las restricciones por sitio web la bloquean."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/es-ES/messages.po b/fluxer_app/src/features/i18n/locales/es-ES/messages.poindex 29b99aee0..7ece40e37 100644--- a/fluxer_app/src/features/i18n/locales/es-ES/messages.po+++ b/fluxer_app/src/features/i18n/locales/es-ES/messages.po@@ -33464,10 +33464,10 @@ msgstr "Solo se muestra cuando tu insignia Visionary está visible y no se muestmsgid "Shows the banner in its own section below the community header."msgstr "Muestra el banner en su propia sección debajo del encabezado de la comunidad."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Muestra el título y la miniatura cuando alguien publica un enlace de YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Muestra el título y la miniatura cuando alguien publica un enlace de YouTube. Activa YouTube Data API v3 con una cuota diaria superior a 0. Restringe la clave por dirección IP o no la restrinjas. Las restricciones por sitio web la bloquean."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/fi/messages.po b/fluxer_app/src/features/i18n/locales/fi/messages.poindex 7e24df521..71abb47b8 100644--- a/fluxer_app/src/features/i18n/locales/fi/messages.po+++ b/fluxer_app/src/features/i18n/locales/fi/messages.po@@ -33464,10 +33464,10 @@ msgstr "Näkyy vain, kun Visionary-merkkisi on näkyvissä eikä näy tavallisenmsgid "Shows the banner in its own section below the community header."msgstr "Näyttää bannerin omassa osiossaan yhteisön otsikon alapuolella."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Näyttää otsikon ja pikkukuvan, kun joku jakaa YouTube-linkin."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Näyttää otsikon ja pikkukuvan, kun joku jakaa YouTube-linkin. Ota käyttöön YouTube Data API v3, jonka päiväkiintiö on yli 0. Rajoita avain IP-osoitteen mukaan tai jätä se rajoittamatta. Verkkosivustorajoitukset estävät sen."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/fr/messages.po b/fluxer_app/src/features/i18n/locales/fr/messages.poindex 38f504b52..9bab487c5 100644--- a/fluxer_app/src/features/i18n/locales/fr/messages.po+++ b/fluxer_app/src/features/i18n/locales/fr/messages.po@@ -33464,10 +33464,10 @@ msgstr "Affiché uniquement quand votre badge Visionary est visible et n'est pasmsgid "Shows the banner in its own section below the community header."msgstr "Affiche la bannière dans sa propre section sous l'en-tête de la communauté."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Affiche le titre et la miniature quand quelqu'un publie un lien YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Affiche le titre et la miniature quand quelqu'un publie un lien YouTube. Activez YouTube Data API v3 avec un quota quotidien supérieur à 0. Limitez la clé par adresse IP ou ne la limitez pas. Les restrictions par site web la bloquent."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/he/messages.po b/fluxer_app/src/features/i18n/locales/he/messages.poindex d5385c6a3..0d89c93a7 100644--- a/fluxer_app/src/features/i18n/locales/he/messages.po+++ b/fluxer_app/src/features/i18n/locales/he/messages.po@@ -33464,10 +33464,10 @@ msgstr "מוצג רק כשתג ה-Visionary שלך גלוי ולא מוצג כמmsgid "Shows the banner in its own section below the community header."msgstr "מציג את הבאנר במקטע משלו מתחת לכותרת הקהילה."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "מציג את הכותרת והתמונה הממוזערת כשמישהו מפרסם קישור ל-YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "מציג את הכותרת והתמונה הממוזערת כשמישהו מפרסם קישור ל-YouTube. הפעל את YouTube Data API v3 עם מכסה יומית גדולה מ-0. הגבל את המפתח לפי כתובת IP או אל תגביל אותו בכלל. הגבלות לפי אתר חוסמות אותו."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/hi/messages.po b/fluxer_app/src/features/i18n/locales/hi/messages.poindex 22216f535..7541c2dea 100644--- a/fluxer_app/src/features/i18n/locales/hi/messages.po+++ b/fluxer_app/src/features/i18n/locales/hi/messages.po@@ -33464,10 +33464,10 @@ msgstr "यह तभी दिखता है जब आपका विजनmsgid "Shows the banner in its own section below the community header."msgstr "कम्युनिटी हेडर के नीचे बैनर को उसके अपने सेक्शन में दिखाता है।"-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "जब कोई YouTube लिंक पोस्ट करता है, तो उसका टाइटल और थंबनेल दिखाता है।"+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "जब कोई YouTube लिंक पोस्ट करता है, तो उसका टाइटल और थंबनेल दिखाता है। YouTube Data API v3 को 0 से अधिक दैनिक कोटा के साथ चालू करें। कुंजी को IP पते से सीमित करें या बिल्कुल सीमित न करें। वेबसाइट प्रतिबंध इसे ब्लॉक करते हैं।"#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/hr/messages.po b/fluxer_app/src/features/i18n/locales/hr/messages.poindex f84fa8c1f..8fc123913 100644--- a/fluxer_app/src/features/i18n/locales/hr/messages.po+++ b/fluxer_app/src/features/i18n/locales/hr/messages.po@@ -33464,10 +33464,10 @@ msgstr "Prikazuje se samo kada je vaša značka Visionary vidljiva i nije maskirmsgid "Shows the banner in its own section below the community header."msgstr "Prikazuje naslovnu sliku u vlastitom odjeljku ispod zaglavlja zajednice."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Prikazuje naslov i sličicu kad netko objavi poveznicu na YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Prikazuje naslov i sličicu kad netko objavi poveznicu na YouTube. Uključite YouTube Data API v3 s dnevnom kvotom većom od 0. Ograničite ključ prema IP adresi ili ga uopće ne ograničavajte. Ograničenja prema web-mjestu ga blokiraju."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/hu/messages.po b/fluxer_app/src/features/i18n/locales/hu/messages.poindex 3db24fb23..5f6d780cb 100644--- a/fluxer_app/src/features/i18n/locales/hu/messages.po+++ b/fluxer_app/src/features/i18n/locales/hu/messages.po@@ -33464,10 +33464,10 @@ msgstr "Csak akkor látszik, ha a Visionary-jelvényed látható, és nem normámsgid "Shows the banner in its own section below the community header."msgstr "A borítóképet külön szakaszban jeleníti meg a közösség fejléce alatt."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Megmutatja a címet és a bélyegképet, amikor valaki YouTube-linket oszt meg."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Megmutatja a címet és a bélyegképet, amikor valaki YouTube-linket oszt meg. Kapcsold be a YouTube Data API v3-at 0-nál nagyobb napi kvótával. Korlátozd a kulcsot IP-cím szerint, vagy ne korlátozd. A webhely szerinti korlátozás letiltja."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/id/messages.po b/fluxer_app/src/features/i18n/locales/id/messages.poindex 95f9f0c99..6c9a6d10d 100644--- a/fluxer_app/src/features/i18n/locales/id/messages.po+++ b/fluxer_app/src/features/i18n/locales/id/messages.po@@ -33464,10 +33464,10 @@ msgstr "Hanya ditampilkan saat lencana Visionary-mu terlihat dan tidak disamarkamsgid "Shows the banner in its own section below the community header."msgstr "Menampilkan banner di bagiannya sendiri di bawah header komunitas."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Menampilkan judul dan gambar mini saat seseorang memposting tautan YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Menampilkan judul dan gambar mini saat seseorang memposting tautan YouTube. Aktifkan YouTube Data API v3 dengan kuota harian di atas 0. Batasi kunci berdasarkan alamat IP atau jangan batasi sama sekali. Pembatasan situs web akan memblokirnya."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/it/messages.po b/fluxer_app/src/features/i18n/locales/it/messages.poindex 83521d513..26ec57e51 100644--- a/fluxer_app/src/features/i18n/locales/it/messages.po+++ b/fluxer_app/src/features/i18n/locales/it/messages.po@@ -33464,10 +33464,10 @@ msgstr "Visibile solo quando il tuo badge Visionary è visibile e non è maschermsgid "Shows the banner in its own section below the community header."msgstr "Mostra il banner in una sezione dedicata sotto l'intestazione della community."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Mostra il titolo e la miniatura quando qualcuno pubblica un link di YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Mostra il titolo e la miniatura quando qualcuno pubblica un link di YouTube. Attiva YouTube Data API v3 con una quota giornaliera superiore a 0. Limita la chiave per indirizzo IP o non limitarla affatto. Le restrizioni per sito web la bloccano."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/ja/messages.po b/fluxer_app/src/features/i18n/locales/ja/messages.poindex 884069067..c06210c41 100644--- a/fluxer_app/src/features/i18n/locales/ja/messages.po+++ b/fluxer_app/src/features/i18n/locales/ja/messages.po@@ -33464,10 +33464,10 @@ msgstr "Visionaryバッジが表示されていて、サブスクリプションmsgid "Shows the banner in its own section below the community header."msgstr "コミュニティヘッダーの下にある専用セクションにバナーを表示します。"-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "YouTubeのリンクが投稿されたときに、タイトルとサムネイルを表示します。"+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "YouTubeのリンクが投稿されたときに、タイトルとサムネイルを表示します。1日の割り当てが0より大きい状態でYouTube Data API v3を有効にしてください。キーはIPアドレスで制限するか、制限なしにしてください。ウェブサイトの制限を使うとブロックされます。"#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/ko/messages.po b/fluxer_app/src/features/i18n/locales/ko/messages.poindex d19cfb69b..da8d228b2 100644--- a/fluxer_app/src/features/i18n/locales/ko/messages.po+++ b/fluxer_app/src/features/i18n/locales/ko/messages.po@@ -33464,10 +33464,10 @@ msgstr "Visionary 배지가 표시되고 구독으로 표시되지 않을 때만msgid "Shows the banner in its own section below the community header."msgstr "커뮤니티 헤더 아래에 배너가 별도의 섹션으로 표시됩니다."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "누군가 YouTube 링크를 올리면 제목과 썸네일을 표시합니다."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "누군가 YouTube 링크를 올리면 제목과 썸네일을 표시합니다. 일일 할당량이 0보다 큰 상태로 YouTube Data API v3을 사용 설정하세요. 키는 IP 주소로 제한하거나 제한하지 마세요. 웹사이트 제한을 사용하면 차단됩니다."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/lt/messages.po b/fluxer_app/src/features/i18n/locales/lt/messages.poindex 15523ac28..bc0318bd6 100644--- a/fluxer_app/src/features/i18n/locales/lt/messages.po+++ b/fluxer_app/src/features/i18n/locales/lt/messages.po@@ -33465,10 +33465,10 @@ msgstr "Rodoma tik tada, kai jūsų „Visionary“ ženklelis matomas ir nerodomsgid "Shows the banner in its own section below the community header."msgstr "Reklamjuostė rodoma atskiroje skiltyje po bendruomenės antrašte."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Rodo pavadinimą ir miniatiūrą, kai kas nors paskelbia YouTube nuorodą."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Rodo pavadinimą ir miniatiūrą, kai kas nors paskelbia YouTube nuorodą. Įjunkite YouTube Data API v3 su didesne nei 0 dienos kvota. Apribokite raktą pagal IP adresą arba visai neribokite. Apribojimai pagal svetainę jį blokuoja."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/nl/messages.po b/fluxer_app/src/features/i18n/locales/nl/messages.poindex 34d81793b..6d54446bf 100644--- a/fluxer_app/src/features/i18n/locales/nl/messages.po+++ b/fluxer_app/src/features/i18n/locales/nl/messages.po@@ -33464,10 +33464,10 @@ msgstr "Alleen zichtbaar als je Visionary-badge zichtbaar is en niet als abonnemmsgid "Shows the banner in its own section below the community header."msgstr "Toont de banner in een eigen sectie onder de communityheader."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Toont de titel en miniatuur als iemand een YouTube-link plaatst."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Toont de titel en miniatuur als iemand een YouTube-link plaatst. Schakel YouTube Data API v3 in met een dagelijks quotum boven 0. Beperk de sleutel op IP-adres of helemaal niet. Websitebeperkingen blokkeren de sleutel."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/no/messages.po b/fluxer_app/src/features/i18n/locales/no/messages.poindex 199c0f61f..0f820ad64 100644--- a/fluxer_app/src/features/i18n/locales/no/messages.po+++ b/fluxer_app/src/features/i18n/locales/no/messages.po@@ -33464,10 +33464,10 @@ msgstr "Vises bare når Visionary-merket ditt er synlig og ikke vises som et vanmsgid "Shows the banner in its own section below the community header."msgstr "Viser banneret i sin egen seksjon under fellesskapets topptekst."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Viser tittel og miniatyrbilde når noen legger ut en YouTube-lenke."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Viser tittel og miniatyrbilde når noen legger ut en YouTube-lenke. Slå på YouTube Data API v3 med en daglig kvote over 0. Begrens nøkkelen etter IP-adresse eller ikke i det hele tatt. Begrensninger etter nettsted blokkerer den."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/pl/messages.po b/fluxer_app/src/features/i18n/locales/pl/messages.poindex 90980bb63..bca6ac73d 100644--- a/fluxer_app/src/features/i18n/locales/pl/messages.po+++ b/fluxer_app/src/features/i18n/locales/pl/messages.po@@ -33464,10 +33464,10 @@ msgstr "Widoczne tylko wtedy, gdy twoja odznaka Visionary jest widoczna i nie jemsgid "Shows the banner in its own section below the community header."msgstr "Wyświetla baner w osobnej sekcji pod nagłówkiem społeczności."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Pokazuje tytuł i miniaturę, gdy ktoś opublikuje link do YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Pokazuje tytuł i miniaturę, gdy ktoś opublikuje link do YouTube. Włącz YouTube Data API v3 z dziennym limitem większym niż 0. Ogranicz klucz według adresu IP albo wcale go nie ograniczaj. Ograniczenia według witryn go blokują."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/pt-BR/messages.po b/fluxer_app/src/features/i18n/locales/pt-BR/messages.poindex 712677a0c..590cbd68f 100644--- a/fluxer_app/src/features/i18n/locales/pt-BR/messages.po+++ b/fluxer_app/src/features/i18n/locales/pt-BR/messages.po@@ -33464,10 +33464,10 @@ msgstr "Só aparece quando seu selo Visionary está visível e não é exibido cmsgid "Shows the banner in its own section below the community header."msgstr "Exibe o banner em uma seção própria abaixo do cabeçalho da comunidade."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Mostra o título e a miniatura quando alguém publica um link do YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Mostra o título e a miniatura quando alguém publica um link do YouTube. Ative a YouTube Data API v3 com uma cota diária acima de 0. Restrinja a chave por endereço IP ou não a restrinja. Restrições por site bloqueiam a chave."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/ro/messages.po b/fluxer_app/src/features/i18n/locales/ro/messages.poindex 517127b15..02b3d4045 100644--- a/fluxer_app/src/features/i18n/locales/ro/messages.po+++ b/fluxer_app/src/features/i18n/locales/ro/messages.po@@ -33464,10 +33464,10 @@ msgstr "Apare doar când insigna ta Visionary este vizibilă și nu este mascatmsgid "Shows the banner in its own section below the community header."msgstr "Afișează bannerul în propria secțiune, sub antetul comunității."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Arată titlul și miniatura când cineva postează un link YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Arată titlul și miniatura când cineva postează un link YouTube. Activează YouTube Data API v3 cu o cotă zilnică mai mare de 0. Restricționează cheia după adresa IP sau deloc. Restricțiile după site web o blochează."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/ru/messages.po b/fluxer_app/src/features/i18n/locales/ru/messages.poindex c3f3900e8..de03bdf07 100644--- a/fluxer_app/src/features/i18n/locales/ru/messages.po+++ b/fluxer_app/src/features/i18n/locales/ru/messages.po@@ -33464,10 +33464,10 @@ msgstr "Показывается, только когда ваш значок Vimsgid "Shows the banner in its own section below the community header."msgstr "Показывает баннер в отдельном разделе под заголовком сообщества."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Показывает заголовок и миниатюру, когда кто-то публикует ссылку на YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Показывает заголовок и миниатюру, когда кто-то публикует ссылку на YouTube. Включите YouTube Data API v3 с дневной квотой больше 0. Ограничьте ключ по IP-адресу или не ограничивайте совсем. Ограничения по сайтам его блокируют."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/sv-SE/messages.po b/fluxer_app/src/features/i18n/locales/sv-SE/messages.poindex 9a523816a..5674bdf0e 100644--- a/fluxer_app/src/features/i18n/locales/sv-SE/messages.po+++ b/fluxer_app/src/features/i18n/locales/sv-SE/messages.po@@ -33464,10 +33464,10 @@ msgstr "Visas bara när ditt Visionary-märke syns och inte visas som ett abonnemsgid "Shows the banner in its own section below the community header."msgstr "Visar bannern i ett eget avsnitt under communityns sidhuvud."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Visar titel och miniatyr när någon delar en YouTube-länk."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Visar titel och miniatyr när någon delar en YouTube-länk. Aktivera YouTube Data API v3 med en daglig kvot över 0. Begränsa nyckeln efter IP-adress eller inte alls. Begränsningar efter webbplats blockerar den."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/th/messages.po b/fluxer_app/src/features/i18n/locales/th/messages.poindex cc747946b..88c71c7c2 100644--- a/fluxer_app/src/features/i18n/locales/th/messages.po+++ b/fluxer_app/src/features/i18n/locales/th/messages.po@@ -33464,10 +33464,10 @@ msgstr "จะแสดงเฉพาะเมื่อป้าย Visionarymsgid "Shows the banner in its own section below the community header."msgstr "แสดงแบนเนอร์ในส่วนของตัวเองที่อยู่ใต้ส่วนหัวของคอมมูนิตี้"-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "แสดงชื่อและภาพย่อเมื่อมีคนโพสต์ลิงก์ YouTube"+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "แสดงชื่อและภาพย่อเมื่อมีคนโพสต์ลิงก์ YouTube เปิดใช้ YouTube Data API v3 โดยตั้งโควต้ารายวันมากกว่า 0 จำกัดคีย์ตามที่อยู่ IP หรือไม่จำกัดเลย การจำกัดตามเว็บไซต์จะบล็อกคีย์"#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/tr/messages.po b/fluxer_app/src/features/i18n/locales/tr/messages.poindex 00172780b..0465e8f01 100644--- a/fluxer_app/src/features/i18n/locales/tr/messages.po+++ b/fluxer_app/src/features/i18n/locales/tr/messages.po@@ -33464,10 +33464,10 @@ msgstr "Yalnızca Visionary rozetiniz görünür olduğunda ve abonelik olarak mmsgid "Shows the banner in its own section below the community header."msgstr "Banner'ı topluluk başlığının altındaki kendi bölümünde gösterir."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Biri YouTube bağlantısı paylaştığında başlığı ve küçük resmi gösterir."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Biri YouTube bağlantısı paylaştığında başlığı ve küçük resmi gösterir. YouTube Data API v3'ü 0'dan büyük bir günlük kotayla etkinleştirin. Anahtarı IP adresine göre kısıtlayın veya hiç kısıtlamayın. Web sitesi kısıtlamaları anahtarı engeller."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/uk/messages.po b/fluxer_app/src/features/i18n/locales/uk/messages.poindex 901741291..bf6f2c225 100644--- a/fluxer_app/src/features/i18n/locales/uk/messages.po+++ b/fluxer_app/src/features/i18n/locales/uk/messages.po@@ -33464,10 +33464,10 @@ msgstr "Показується, лише коли ваш значок Visionarymsgid "Shows the banner in its own section below the community header."msgstr "Показує банер в окремому розділі під заголовком спільноти."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Показує назву й мініатюру, коли хтось публікує посилання на YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Показує назву й мініатюру, коли хтось публікує посилання на YouTube. Увімкніть YouTube Data API v3 з денною квотою понад 0. Обмежте ключ за IP-адресою або не обмежуйте зовсім. Обмеження за вебсайтами його блокують."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/vi/messages.po b/fluxer_app/src/features/i18n/locales/vi/messages.poindex e63b51620..c1994fb92 100644--- a/fluxer_app/src/features/i18n/locales/vi/messages.po+++ b/fluxer_app/src/features/i18n/locales/vi/messages.po@@ -33464,10 +33464,10 @@ msgstr "Chỉ hiển thị khi huy hiệu Visionary của bạn đang hiện vàmsgid "Shows the banner in its own section below the community header."msgstr "Hiển thị ảnh bìa trong phần riêng bên dưới tiêu đề cộng đồng."-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "Hiện tiêu đề và hình thu nhỏ khi ai đó đăng liên kết YouTube."+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "Hiện tiêu đề và hình thu nhỏ khi ai đó đăng liên kết YouTube. Bật YouTube Data API v3 với hạn mức hằng ngày lớn hơn 0. Giới hạn khóa theo địa chỉ IP hoặc không giới hạn. Giới hạn theo trang web sẽ chặn khóa."#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/zh-CN/messages.po b/fluxer_app/src/features/i18n/locales/zh-CN/messages.poindex 236ff705b..6da52c48e 100644--- a/fluxer_app/src/features/i18n/locales/zh-CN/messages.po+++ b/fluxer_app/src/features/i18n/locales/zh-CN/messages.po@@ -33464,10 +33464,10 @@ msgstr "仅在你的 Visionary 徽章可见且未显示为普通订阅时显示msgid "Shows the banner in its own section below the community header."msgstr "在社区标题下方的独立部分中显示横幅。"-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "有人发布 YouTube 链接时显示标题和缩略图。"+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "有人发布 YouTube 链接时显示标题和缩略图。启用 YouTube Data API v3,并将每日配额设为大于 0。按 IP 地址限制密钥,或不加限制。网站限制会导致密钥被拦截。"#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_app/src/features/i18n/locales/zh-TW/messages.po b/fluxer_app/src/features/i18n/locales/zh-TW/messages.poindex cd9d9802b..41c1bd272 100644--- a/fluxer_app/src/features/i18n/locales/zh-TW/messages.po+++ b/fluxer_app/src/features/i18n/locales/zh-TW/messages.po@@ -33464,10 +33464,10 @@ msgstr "僅在您的 Visionary 徽章可見且未顯示為訂閱時顯示。"msgid "Shows the banner in its own section below the community header."msgstr "在社群標頭下方的獨立區塊中顯示橫幅。"-#. Help under the YouTube Data API key field in the setup wizard.+#. Help under the YouTube Data API key field in the setup wizard. YouTube Data API v3 is a product name. Website restrictions means the Websites application restriction in the Google Cloud console.#: src/features/app/components/setup/SetupServicesStep.tsx-msgid "Shows the title and thumbnail when someone posts a YouTube link."-msgstr "有人張貼 YouTube 連結時顯示標題和縮圖。"+msgid "Shows the title and thumbnail when someone posts a YouTube link. Enable YouTube Data API v3 with a daily quota above 0. Restrict the key by IP address or not at all. Website restrictions block it."+msgstr "有人張貼 YouTube 連結時顯示標題和縮圖。啟用 YouTube Data API v3,並將每日配額設為大於 0。依 IP 位址限制金鑰,或不加限制。網站限制會導致金鑰遭到封鎖。"#. Where the app icon branding image appears and the recommended format, in the setup wizard. size is a file size such as 10 MB.#: src/features/app/components/setup/SetupBrandingAssetField.tsxdiff --git a/fluxer_docs/src/content/docs/operator/environment.mdx b/fluxer_docs/src/content/docs/operator/environment.mdxindex 65b01d768..236310227 100644--- a/fluxer_docs/src/content/docs/operator/environment.mdx+++ b/fluxer_docs/src/content/docs/operator/environment.mdx@@ -1217,7 +1217,7 @@ The Klipy API key for GIF search and Klipy link previews. A key saved in the adm### `FLUXER_YOUTUBE_API_KEY`-The YouTube Data API key Fluxer uses for YouTube link previews. A key saved in the admin panel is used first. Keep it secret. With rexctl, use `rexctl config set integrations.youtube.api_key`.+The YouTube Data API key Fluxer uses for YouTube link previews. A key saved in the admin panel is used first. The unfurl service calls the API from your server. The key needs YouTube Data API v3 enabled, a daily quota above 0, and an application restriction of None or IP addresses. A key restricted to websites (HTTP referrers) always fails. When Google rejects the key, the unfurl logs show the reason it gives, such as `quotaExceeded` or `API_KEY_HTTP_REFERRER_BLOCKED`. Keep it secret. With rexctl, use `rexctl config set integrations.youtube.api_key`.### `FLUXER_API_UNFURL_IGNORED_HOSTS`diff --git a/fluxer_rexctl/internal/instance/envvars.go b/fluxer_rexctl/internal/instance/envvars.goindex dbe228b9b..9ce0a1601 100644--- a/fluxer_rexctl/internal/instance/envvars.go+++ b/fluxer_rexctl/internal/instance/envvars.go@@ -319,7 +319,7 @@ var envVars = []envVar{{"FLUXER_BLOCKLIST_FEEDS_ENABLED", "integrations", "Whether the worker downloads the URLhaus and PhishTank link lists every six hours and the MalwareBazaar file hashes every twelve hours, and checks posted links and uploads against them. Use `true` or `false`. When it's empty, this is off on a self-hosted instance."},{"FLUXER_GEOIP_DB_PATH", "integrations", "Where the api and worker load the MaxMind GeoIP database from, as a file path or an `s3://bucket/key` URL. An s3 URL needs a `download_path` query parameter with an absolute path."},{"FLUXER_KLIPY_API_KEY", "integrations", "The Klipy API key for GIF search and Klipy link previews. A key saved in the admin panel is used first. GIF search is off when neither is set."},- {"FLUXER_YOUTUBE_API_KEY", "integrations", "The YouTube Data API key Fluxer uses for YouTube link previews. A key saved in the admin panel is used first."},+ {"FLUXER_YOUTUBE_API_KEY", "integrations", "The YouTube Data API key Fluxer uses for YouTube link previews. A key saved in the admin panel is used first. The unfurl service calls the API from your server. The key needs YouTube Data API v3 enabled, a daily quota above 0, and an application restriction of None or IP addresses. A key restricted to websites (HTTP referrers) always fails. When Google rejects the key, the unfurl logs show the reason it gives, such as `quotaExceeded` or `API_KEY_HTTP_REFERRER_BLOCKED`."},{"FLUXER_API_UNFURL_IGNORED_HOSTS", "integrations", "Hostnames, separated by commas, that Fluxer never makes link previews for. A link matches only when its host is exactly one of these."},{"FLUXER_AUTH_BLUESKY_ENABLED", "integrations", "Whether people can link a Bluesky account to their profile. Use `true` or `false`. It needs FLUXER_AUTH_BLUESKY_KEYS. When it's empty, Fluxer uses `false`."},{"FLUXER_AUTH_BLUESKY_CLIENT_NAME", "integrations", "The app name Bluesky shows when someone links their account. When it's empty, Bluesky shows `Fluxer`, even when FLUXER_APP_PRODUCT_NAME is set."},diff --git a/fluxer_rexctl/internal/instance/shipped.json b/fluxer_rexctl/internal/instance/shipped.jsonindex 7a8cce007..b8ee32fff 100644--- a/fluxer_rexctl/internal/instance/shipped.json+++ b/fluxer_rexctl/internal/instance/shipped.json@@ -23,6 +23,8 @@"455e8fa8321e7feeb2eecec376c58e6d9b55fec7b411d575fd47e72e3a6591b7","48387bf3cad43d59021a54e194a57536ab29b902a1391ad960c5155003023cdd","4839813570835bd490a77c223393918a8886de6d41c91191fae650a3a2d9b62f",+ "4a832e261a626a9cb2c5dda4e0a1eb4b95df69b31a7428ce211c4f3b30d35eee",+ "4b4b5f46043acec642d13d9127458d1530471bbf17a599e78c907dd1ffbcda38","4c2e09384626a1cd1db2bedfb8407a511dd791209b2d3126f9c9eb74e2712c4f","4d728275b94de079eedc55f908959802d481d760105d091ce3e11e86fd710298","4d9e1f3f1a8edca1792943e15ebac5ae4f811536e86c0ff2e496bd1c4a1a1ea8",@@ -36,6 +38,7 @@"6188588df12b426670119483c24d0b2a3182e28c7c1d6bed241d50323dcd9439","657789086500da432901c143ec001dc46fa125aa5b77d01548ff82065d8fe457","6a946f39a24f77084ea805342984d635f3082ce8e1c23ab4fc17ba8de38886b5",+ "6aac6ee98c51e22637905137b6b798eb4b3935ef0d06712cfb0dc677550545eb","6b19e20d94980710724bd400104498c87def9bad5f3032a56c7f09fcf9e1b9b3","6fae7995d47c43a00bd0107ff7b60e0d1e000768dc4b38c34d3e3a0d2a6f8bb3","727d5063ed2c959932d7721d8a806f77852cfb017b2fd3f981e01f31c136c057",@@ -112,6 +115,7 @@"c60a0e1dda5348ac3efe72edcf288e13f81dd826d69fadb53fad35fba94dcf6e"],"docker-compose.yml": [+ "0055fbb8c40be27127f2f021c72a6e4b68791fe918fbba389cf537ec0e41eb6c","04d81e0d92905b34e09cd99b22bf92f6b9b311c7405c7a71b8991049496159f8","0efe4372775d4f4ec72d1ef6544cbd3e0e562f9e71416c7066f9a1ef86d5b2f3","0f21293efe5232437bbe5f1789b20aafc22b4ec2542640eba12077a0520ab04e",diff --git a/fluxer_rexctl/internal/stack/files/.env.example b/fluxer_rexctl/internal/stack/files/.env.exampleindex cc40a8666..6109f9b66 100644--- a/fluxer_rexctl/internal/stack/files/.env.example+++ b/fluxer_rexctl/internal/stack/files/.env.example@@ -1847,7 +1847,12 @@ FLUXER_VAPID_PRIVATE_KEY=# FLUXER_KLIPY_API_KEY=# The YouTube Data API key Fluxer uses for YouTube link previews. A key saved-# in the admin panel is used first. Keep it secret.+# in the admin panel is used first. The unfurl service calls the API from your+# server. The key needs YouTube Data API v3 enabled, a daily quota above 0,+# and an application restriction of None or IP addresses. A key restricted to+# websites (HTTP referrers) always fails. When Google rejects the key, the+# unfurl logs show the reason it gives, such as quotaExceeded or+# API_KEY_HTTP_REFERRER_BLOCKED. Keep it secret.# rexctl: rexctl config set integrations.youtube.api_key# FLUXER_YOUTUBE_API_KEY=diff --git a/fluxer_unfurl/src/resolvers/default_resolver.rs b/fluxer_unfurl/src/resolvers/default_resolver.rsindex e73da81b0..bb10a4a97 100644--- a/fluxer_unfurl/src/resolvers/default_resolver.rs+++ b/fluxer_unfurl/src/resolvers/default_resolver.rs@@ -601,6 +601,36 @@ mod tests {assert_eq!(classify(denied), "link");}+ #[test]+ fn vimeo_player_media_keeps_no_dimensions() {+ let html = r#"<head>+ <meta property="og:type" content="video.other">+ <meta property="og:video:url" content="https://player.vimeo.com/video/1">+ <meta property="og:video:width" content="1280">+ <meta property="og:video:height" content="720">+ <meta name="twitter:card" content="player">+ <meta name="twitter:player" content="https://player.vimeo.com/video/1">+ <meta name="twitter:player:width" content="1280">+ <meta name="twitter:player:height" content="720">+ </head>"#;+ let page = url("https://vimeo.com/1");+ let og = html_parser::parse_opengraph(html);+ let twitter_card = html_parser::parse_twitter_card(html);+ for value in [og.video_primary, twitter_card.player] {+ let player_url = value+ .as_deref()+ .and_then(|value| resolve_media_url(&page, value))+ .filter(|value| is_allowlisted_player_url(value))+ .expect("allowlisted Vimeo player");+ let media = player_embed_media(player_url);+ assert_eq!(+ media.url.as_deref(),+ Some("https://player.vimeo.com/video/1")+ );+ assert_eq!((media.width, media.height), (None, None));+ }+ }+#[test]fn player_allowlist_rejects_other_hosts() {for value in [diff --git a/fluxer_unfurl/src/resolvers/youtube.rs b/fluxer_unfurl/src/resolvers/youtube.rsindex b15fa60ea..0503db583 100644--- a/fluxer_unfurl/src/resolvers/youtube.rs+++ b/fluxer_unfurl/src/resolvers/youtube.rs@@ -15,6 +15,7 @@ const YOUTUBE_API_BASE: &str = "https://www.googleapis.com/youtube/v3/videos";const YOUTUBE_API_MAX_BYTES: usize = 256 * 1024;const YOUTUBE_API_TIMEOUT: Duration = Duration::from_secs(10);const YOUTUBE_DESCRIPTION_MAX: usize = 350;+const YOUTUBE_PLAYER_SIZE: (u32, u32) = (1280, 720);const YOUTUBE_HOSTS: &[&str] = &["www.youtube.com",@@ -51,132 +52,202 @@ impl Resolver for YouTubeResolver {&'a self,ctx: &'a ResolveContext<'_>,) -> Pin<Box<dyn Future<Output = anyhow::Result<ResolverResult>> + Send + 'a>> {- Box::pin(async move {- let parsed = match parse_youtube_url(&ctx.original_url) {- Some(p) => p,- None => {- return Ok(ResolverResult { embeds: vec![] });- }- };-- let Some(api_key) = ctx.youtube_api_key.clone() else {- tracing::debug!("No YouTube API key configured");- return Ok(ResolverResult { embeds: vec![] });- };-- let api_url = build_youtube_api_url(&parsed.video_id, &api_key)?;- let api_response = http_fetch::fetch_url(- &ctx.http_client,- api_url.as_ref(),- YOUTUBE_API_MAX_BYTES,- YOUTUBE_API_TIMEOUT,- )- .await?;- if api_response.status != 200 {- tracing::error!(- video_id = %parsed.video_id,- status = api_response.status,- "Failed to fetch YouTube API data"- );- return Ok(ResolverResult { embeds: vec![] });- }- let data: YouTubeApiResponse = serde_json::from_slice(&api_response.bytes)?;- let Some(video) = data.items.and_then(|mut items| items.pop()) else {- tracing::error!(video_id = %parsed.video_id, "No YouTube video data found");- return Ok(ResolverResult { embeds: vec![] });- };-- let mut embed_url_parsed = Url::parse(&format!(- "https://www.youtube.com/embed/{}",- parsed.video_id- ))- .unwrap_or_else(|_| ctx.url.clone());- if let Some(t) = parsed.timestamp {- embed_url_parsed- .query_pairs_mut()- .append_pair("start", &t.to_string());- }+ Box::pin(resolve_video(ctx, YOUTUBE_API_BASE))+ }+}- let mut main_url = Url::parse("https://www.youtube.com/watch")?;- main_url- .query_pairs_mut()- .append_pair("v", &parsed.video_id);- if let Some(t) = parsed.timestamp {- main_url- .query_pairs_mut()- .append_pair("start", &t.to_string());- }+async fn resolve_video(ctx: &ResolveContext<'_>, api_base: &str) -> anyhow::Result<ResolverResult> {+ let Some(parsed) = parse_youtube_url(&ctx.original_url) else {+ return Ok(ResolverResult { embeds: vec![] });+ };- let mut embed = MessageEmbed::new("video");- embed.url = Some(main_url.to_string());- embed.title = Some(video.snippet.title);- embed.description = Some(parse_youtube_string(- &video.snippet.description,- YOUTUBE_DESCRIPTION_MAX,- ));- embed.color = Some(YOUTUBE_COLOR);-- if !video.snippet.channel_title.is_empty() {- embed.author = Some(EmbedAuthor {- name: text_limits::truncate(- &video.snippet.channel_title,- text_limits::AUTHOR_NAME_MAX,- ),- url: Some(format!(- "https://www.youtube.com/channel/{}",- video.snippet.channel_id- )),- ..Default::default()- });- }+ let api_video = match ctx.youtube_api_key.as_deref() {+ Some(api_key) => fetch_api_video(ctx, api_base, &parsed.video_id, api_key).await,+ None => {+ tracing::debug!("No YouTube API key configured");+ None+ }+ };- embed.provider = Some(EmbedProvider {- name: "YouTube".to_owned(),- url: Some("https://www.youtube.com".to_owned()),- });-- if let Some(thumbnail) = video.snippet.thumbnails.best() {- let nsfw_str = crate::media_proxy::MediaProxyClient::nsfw_mode_str(ctx.nsfw_mode);- let thumbnail_meta =- match ctx.media_proxy.get_metadata(&thumbnail.url, nsfw_str).await {- Ok(meta) => Some(meta),- Err(err) => {- tracing::warn!(- error = %err,- url = thumbnail.url,- "failed to enrich YouTube thumbnail metadata"- );- None- }- };- let media = thumbnail_meta- .as_ref()- .map(|meta| meta.to_embed_media(&thumbnail.url))- .unwrap_or_else(|| EmbedMedia {- url: Some(thumbnail.url.clone()),- content_type: Some("image/jpeg".to_owned()),- ..Default::default()- });- embed.thumbnail = Some(EmbedMedia {- width: thumbnail.width.or(media.width),- height: thumbnail.height.or(media.height),- ..media- });- }+ let Some(video) = api_video else {+ return Ok(ResolverResult { embeds: vec![] });+ };+ let embed = build_api_embed(ctx, &parsed, video).await?;++ Ok(ResolverResult {+ embeds: vec![embed],+ })+}- let (embed_width, embed_height) =- parse_player_embed_dimensions(&video.player.embed_html).unwrap_or((1280, 720));- embed.video = Some(EmbedMedia {- url: Some(embed_url_parsed.to_string()),- width: Some(embed_width),- height: Some(embed_height),+async fn fetch_api_video(+ ctx: &ResolveContext<'_>,+ api_base: &str,+ video_id: &str,+ api_key: &str,+) -> Option<YouTubeVideo> {+ let api_url = build_youtube_api_url(api_base, video_id, api_key).ok()?;+ let api_response = match http_fetch::fetch_url(+ &ctx.http_client,+ api_url.as_ref(),+ YOUTUBE_API_MAX_BYTES,+ YOUTUBE_API_TIMEOUT,+ )+ .await+ {+ Ok(response) => response,+ Err(err) => {+ tracing::error!(video_id, error = %err, "Failed to fetch YouTube API data");+ return None;+ }+ };+ if api_response.status != 200 {+ let error = api_error(&api_response.bytes);+ tracing::error!(+ video_id,+ status = api_response.status,+ reason = error.reason.as_deref().unwrap_or("unknown"),+ message = error.message.as_deref().unwrap_or(""),+ "YouTube Data API rejected the request"+ );+ return None;+ }+ let data: YouTubeApiResponse = match serde_json::from_slice(&api_response.bytes) {+ Ok(data) => data,+ Err(err) => {+ tracing::error!(video_id, error = %err, "Failed to parse YouTube API data");+ return None;+ }+ };+ let video = data.items.and_then(|mut items| items.pop());+ if video.is_none() {+ tracing::error!(video_id, "No YouTube video data found");+ }+ video+}++async fn build_api_embed(+ ctx: &ResolveContext<'_>,+ parsed: &ParsedYouTube,+ video: YouTubeVideo,+) -> anyhow::Result<MessageEmbed> {+ let mut embed = base_video_embed(parsed)?;+ embed.title = Some(video.snippet.title);+ embed.description = Some(parse_youtube_string(+ &video.snippet.description,+ YOUTUBE_DESCRIPTION_MAX,+ ));++ if !video.snippet.channel_title.is_empty() {+ embed.author = Some(EmbedAuthor {+ name: text_limits::truncate(&video.snippet.channel_title, text_limits::AUTHOR_NAME_MAX),+ url: Some(format!(+ "https://www.youtube.com/channel/{}",+ video.snippet.channel_id+ )),+ ..Default::default()+ });+ }++ if let Some(thumbnail) = video.snippet.thumbnails.best() {+ embed.thumbnail =+ Some(thumbnail_media(ctx, &thumbnail.url, thumbnail.width, thumbnail.height).await);+ }++ let (embed_width, embed_height) =+ parse_player_embed_dimensions(&video.player.embed_html).unwrap_or(YOUTUBE_PLAYER_SIZE);+ if let Some(media) = embed.video.as_mut() {+ media.width = Some(embed_width);+ media.height = Some(embed_height);+ }++ Ok(embed)+}++fn base_video_embed(parsed: &ParsedYouTube) -> anyhow::Result<MessageEmbed> {+ let mut embed_url = Url::parse(&format!(+ "https://www.youtube.com/embed/{}",+ parsed.video_id+ ))?;+ let mut main_url = Url::parse("https://www.youtube.com/watch")?;+ main_url+ .query_pairs_mut()+ .append_pair("v", &parsed.video_id);+ if let Some(t) = parsed.timestamp {+ embed_url+ .query_pairs_mut()+ .append_pair("start", &t.to_string());+ main_url+ .query_pairs_mut()+ .append_pair("start", &t.to_string());+ }++ let (width, height) = YOUTUBE_PLAYER_SIZE;+ let mut embed = MessageEmbed::new("video");+ embed.url = Some(main_url.to_string());+ embed.color = Some(YOUTUBE_COLOR);+ embed.provider = Some(EmbedProvider {+ name: "YouTube".to_owned(),+ url: Some("https://www.youtube.com".to_owned()),+ });+ embed.video = Some(EmbedMedia {+ url: Some(embed_url.to_string()),+ width: Some(width),+ height: Some(height),+ ..Default::default()+ });+ Ok(embed)+}++async fn thumbnail_media(+ ctx: &ResolveContext<'_>,+ url: &str,+ width: Option<u32>,+ height: Option<u32>,+) -> EmbedMedia {+ let nsfw_str = crate::media_proxy::MediaProxyClient::nsfw_mode_str(ctx.nsfw_mode);+ let media = match ctx.media_proxy.get_metadata(url, nsfw_str).await {+ Ok(meta) => meta.to_embed_media(url),+ Err(err) => {+ tracing::warn!(+ error = %err,+ url,+ "failed to enrich YouTube thumbnail metadata"+ );+ EmbedMedia {+ url: Some(url.to_owned()),+ content_type: Some("image/jpeg".to_owned()),..Default::default()- });+ }+ }+ };+ EmbedMedia {+ width: width.or(media.width),+ height: height.or(media.height),+ ..media+ }+}++#[derive(Debug, Default, PartialEq, Eq)]+struct YouTubeApiError {+ reason: Option<String>,+ message: Option<String>,+}- Ok(ResolverResult {- embeds: vec![embed],- })+fn api_error(body: &[u8]) -> YouTubeApiError {+ let Ok(value) = serde_json::from_slice::<serde_json::Value>(body) else {+ return YouTubeApiError::default();+ };+ let error = &value["error"];+ let first_reason = |key: &str| {+ error[key].as_array().and_then(|entries| {+ entries+ .iter()+ .find_map(|entry| entry["reason"].as_str().map(ToOwned::to_owned))})+ };+ YouTubeApiError {+ reason: first_reason("details").or_else(|| first_reason("errors")),+ message: error["message"].as_str().map(ToOwned::to_owned),}}@@ -234,8 +305,8 @@ struct YouTubeThumbnail {height: Option<u32>,}-fn build_youtube_api_url(video_id: &str, api_key: &str) -> anyhow::Result<Url> {- let mut url = Url::parse(YOUTUBE_API_BASE)?;+fn build_youtube_api_url(base: &str, video_id: &str, api_key: &str) -> anyhow::Result<Url> {+ let mut url = Url::parse(base)?;url.query_pairs_mut().append_pair("key", api_key).append_pair("id", video_id)@@ -349,3 +420,105 @@ fn extract_timestamp(url: &Url) -> Option<u64> {}t.parse().ok()}++#[cfg(test)]+mod tests {+ use super::*;+ use crate::media_proxy::MediaProxyClient;+ use crate::types::NsfwMode;+ use std::io::{BufRead, BufReader, Write};+ use std::net::TcpListener;++ const QUOTA_EXCEEDED_BODY: &str = r#"{"error":{"code":403,"message":"The request cannot be completed because you have exceeded your quota.","errors":[{"message":"The request cannot be completed because you have exceeded your quota.","domain":"youtube.quota","reason":"quotaExceeded"}]}}"#;++ fn spawn_google_stub() -> String {+ let listener = TcpListener::bind("127.0.0.1:0").unwrap();+ let proxy = format!("http://{}", listener.local_addr().unwrap());+ std::thread::spawn(move || {+ for stream in listener.incoming() {+ let mut stream = stream.unwrap();+ let mut reader = BufReader::new(stream.try_clone().unwrap());+ let mut request_line = String::new();+ reader.read_line(&mut request_line).unwrap();+ loop {+ let mut line = String::new();+ reader.read_line(&mut line).unwrap();+ if line.trim_end().is_empty() {+ break;+ }+ }+ let body = QUOTA_EXCEEDED_BODY;+ let response = format!(+ "HTTP/1.1 403 Forbidden\r\nContent-Type: application/json\r\nContent-Length: {}\r\nConnection: close\r\n\r\n{body}",+ body.len()+ );+ stream.write_all(response.as_bytes()).unwrap();+ }+ });+ proxy+ }++ async fn resolve_against_stub(api_key: Option<&str>) -> Vec<MessageEmbed> {+ let proxy = spawn_google_stub();+ let http_client = reqwest::Client::builder()+ .redirect(reqwest::redirect::Policy::none())+ .proxy(reqwest::Proxy::http(proxy).unwrap())+ .build()+ .unwrap();+ let media_proxy = MediaProxyClient::new_with_public_endpoint(+ "http://127.0.0.1:1",+ "secret",+ None,+ reqwest::Client::new(),+ );+ let watch = Url::parse("https://www.youtube.com/watch?v=dQw4w9WgXcQ").unwrap();+ let ctx = ResolveContext {+ url: watch.clone(),+ original_url: watch,+ http_client,+ nsfw_mode: NsfwMode::Allow,+ media_proxy: &media_proxy,+ self_hosted: true,+ youtube_api_key: api_key.map(ToOwned::to_owned),+ klipy_api_key: None,+ activity_pub_signer: None,+ };+ resolve_video(&ctx, "http://1.1.1.1/youtube/v3/videos")+ .await+ .unwrap()+ .embeds+ }++ #[tokio::test]+ async fn rejected_api_key_yields_no_embed() {+ assert!(+ resolve_against_stub(Some("restricted-key"))+ .await+ .is_empty()+ );+ }++ #[tokio::test]+ async fn missing_api_key_yields_no_embed() {+ assert!(resolve_against_stub(None).await.is_empty());+ }++ #[test]+ fn api_error_reports_google_reason() {+ assert_eq!(+ api_error(QUOTA_EXCEEDED_BODY.as_bytes()).reason.as_deref(),+ Some("quotaExceeded")+ );++ let referrer_blocked = br#"{"error":{"code":403,"message":"Requests from referer <empty> are blocked.","errors":[{"message":"Requests from referer <empty> are blocked.","domain":"global","reason":"forbidden"}],"status":"PERMISSION_DENIED","details":[{"@type":"type.googleapis.com/google.rpc.ErrorInfo","reason":"API_KEY_HTTP_REFERRER_BLOCKED","domain":"googleapis.com"}]}}"#;+ assert_eq!(+ api_error(referrer_blocked),+ YouTubeApiError {+ reason: Some("API_KEY_HTTP_REFERRER_BLOCKED".to_owned()),+ message: Some("Requests from referer <empty> are blocked.".to_owned()),+ }+ );++ assert_eq!(api_error(b"not json"), YouTubeApiError::default());+ }+}