Merge branch 'master' of github.com:iv-org/invidious

This commit is contained in:
テクニカル諏訪子 2021-11-18 12:27:31 +09:00
commit b99579bbff
16 changed files with 95 additions and 74 deletions

View file

@ -40,7 +40,7 @@ jobs:
crystal: crystal:
- 1.0.0 - 1.0.0
- 1.1.1 - 1.1.1
- 1.2.1 - 1.2.2
include: include:
- crystal: nightly - crystal: nightly
stable: false stable: false

View file

@ -27,7 +27,7 @@ jobs:
- name: Install Crystal - name: Install Crystal
uses: oprypin/install-crystal@v1.2.4 uses: oprypin/install-crystal@v1.2.4
with: with:
crystal: 1.1.1 crystal: 1.2.2
- name: Run lint - name: Run lint
run: | run: |

View file

@ -1,4 +1,4 @@
FROM crystallang/crystal:1.2.1-alpine AS builder FROM crystallang/crystal:1.2.2-alpine AS builder
RUN apk add --no-cache sqlite-static yaml-static RUN apk add --no-cache sqlite-static yaml-static
ARG release ARG release

View file

@ -432,5 +432,6 @@
"adminprefs_modified_source_code_url_label": "URL إلى مستودع التعليمات البرمجية المصدرية المعدلة", "adminprefs_modified_source_code_url_label": "URL إلى مستودع التعليمات البرمجية المصدرية المعدلة",
"footer_documentation": "التوثيق", "footer_documentation": "التوثيق",
"footer_donate_page": "تبرّع", "footer_donate_page": "تبرّع",
"preferences_region_label": "بلد المحتوى:. " "preferences_region_label": "بلد المحتوى:. ",
"preferences_quality_dash_label": "جودة الفيديو المفضلة dash: "
} }

View file

@ -68,7 +68,7 @@
"preferences_listen_label": "Standardno slušaj: ", "preferences_listen_label": "Standardno slušaj: ",
"preferences_local_label": "Koristi posrednika videa: ", "preferences_local_label": "Koristi posrednika videa: ",
"preferences_speed_label": "Standardna brzina: ", "preferences_speed_label": "Standardna brzina: ",
"preferences_quality_label": "Primarna kvaliteta videa: ", "preferences_quality_label": "Preferirana kvaliteta videa: ",
"preferences_volume_label": "Glasnoća playera: ", "preferences_volume_label": "Glasnoća playera: ",
"preferences_comments_label": "Standardni komentari: ", "preferences_comments_label": "Standardni komentari: ",
"youtube": "YouTube", "youtube": "YouTube",
@ -432,5 +432,6 @@
"footer_modfied_source_code": "Izmijenjeni izvorni kod", "footer_modfied_source_code": "Izmijenjeni izvorni kod",
"footer_documentation": "Dokumentacija", "footer_documentation": "Dokumentacija",
"footer_original_source_code": "Izvoran izvorni kod", "footer_original_source_code": "Izvoran izvorni kod",
"preferences_region_label": "Zemlja sadržaja: " "preferences_region_label": "Zemlja sadržaja: ",
"preferences_quality_dash_label": "Preferirana kvaliteta dash-videa: "
} }

View file

@ -12,9 +12,9 @@
"": "`x` daftar putar" "": "`x` daftar putar"
}, },
"LIVE": "SIARAN LANGSUNG", "LIVE": "SIARAN LANGSUNG",
"Shared `x` ago": "Dibagikan`x` lalu", "Shared `x` ago": "Dibagikan `x` yang lalu",
"Unsubscribe": "Batal Langganan", "Unsubscribe": "Batal Langganan",
"Subscribe": "Langganan", "Subscribe": "Berangganan",
"View channel on YouTube": "Lihat kanal di YouTube", "View channel on YouTube": "Lihat kanal di YouTube",
"View playlist on YouTube": "Lihat daftar putar di YouTube", "View playlist on YouTube": "Lihat daftar putar di YouTube",
"newest": "terbaru", "newest": "terbaru",
@ -44,11 +44,11 @@
"Export data as JSON": "Ekspor data sebagai JSON", "Export data as JSON": "Ekspor data sebagai JSON",
"Delete account?": "Hapus akun?", "Delete account?": "Hapus akun?",
"History": "Riwayat", "History": "Riwayat",
"An alternative front-end to YouTube": "Sebuah alternatif front-end untuk YouTube", "An alternative front-end to YouTube": "Sebuah alternatif layar depan untuk YouTube",
"JavaScript license information": "Informasi lisensi JavaScript", "JavaScript license information": "Informasi lisensi JavaScript",
"source": "sumber", "source": "sumber",
"Log in": "Masuk", "Log in": "Masuk",
"Log in/register": "Daftar", "Log in/register": "Masuk/Daftar",
"Log in with Google": "Masuk dengan Google", "Log in with Google": "Masuk dengan Google",
"User ID": "ID Pengguna", "User ID": "ID Pengguna",
"Password": "Kata Sandi", "Password": "Kata Sandi",
@ -62,21 +62,21 @@
"Preferences": "Preferensi", "Preferences": "Preferensi",
"preferences_category_player": "Preferensi pemutar", "preferences_category_player": "Preferensi pemutar",
"preferences_video_loop_label": "Selalu ulangi: ", "preferences_video_loop_label": "Selalu ulangi: ",
"preferences_autoplay_label": "Putar-Otomatis: ", "preferences_autoplay_label": "Putar Otomatis: ",
"preferences_continue_label": "Putar selanjutnya secara default: ", "preferences_continue_label": "Putar selanjutnya secara baku: ",
"preferences_continue_autoplay_label": "Otomatis-Putar video berikutnya: ", "preferences_continue_autoplay_label": "Putar otomatis video berikutnya: ",
"preferences_listen_label": "Dengarkan secara default: ", "preferences_listen_label": "Dengarkan secara baku: ",
"preferences_local_label": "Video Proksi: ", "preferences_local_label": "Proksi video: ",
"preferences_speed_label": "Kecepatan default: ", "preferences_speed_label": "Kecepatan baku: ",
"preferences_quality_label": "Kualitas video yang disukai: ", "preferences_quality_label": "Kualitas video yang disukai: ",
"preferences_volume_label": "Volume pemutar: ", "preferences_volume_label": "Volume pemutar: ",
"preferences_comments_label": "Komentar default: ", "preferences_comments_label": "Komentar baku: ",
"youtube": "YouTube", "youtube": "YouTube",
"reddit": "Reddit", "reddit": "Reddit",
"preferences_captions_label": "Subtitel default: ", "preferences_captions_label": "Takarir baku: ",
"Fallback captions: ": "Subtitel fallback: ", "Fallback captions: ": "Takarir cadangan: ",
"preferences_related_videos_label": "Tampilkan video terkait: ", "preferences_related_videos_label": "Tampilkan video terkait: ",
"preferences_annotations_label": "Tampilkan anotasi secara default: ", "preferences_annotations_label": "Tampilkan anotasi secara baku: ",
"preferences_extend_desc_label": "Perluas deskripsi video secara otomatis: ", "preferences_extend_desc_label": "Perluas deskripsi video secara otomatis: ",
"preferences_vr_mode_label": "Video interaktif 360°: ", "preferences_vr_mode_label": "Video interaktif 360°: ",
"preferences_category_visual": "Preferensi visual", "preferences_category_visual": "Preferensi visual",
@ -89,16 +89,16 @@
"preferences_category_misc": "Preferensi lainnya", "preferences_category_misc": "Preferensi lainnya",
"preferences_automatic_instance_redirect_label": "Pengalihan peladen otomatis (balik kembali ke redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Pengalihan peladen otomatis (balik kembali ke redirect.invidious.io): ",
"preferences_category_subscription": "Preferensi langganan", "preferences_category_subscription": "Preferensi langganan",
"preferences_annotations_subscribed_label": "Tampilkan anotasi secara default untuk kanal langganan: ", "preferences_annotations_subscribed_label": "Tampilkan anotasi secara baku untuk kanal yang dilanggan? ",
"Redirect homepage to feed: ": "Arahkan kembali laman beranda ke umpan: ", "Redirect homepage to feed: ": "Arahkan kembali laman beranda ke umpan: ",
"preferences_max_results_label": "Jumlah video ditampilkan di umpan: ", "preferences_max_results_label": "Jumlah video ditampilkan di umpan: ",
"preferences_sort_label": "Urutkan video berdasarkan: ", "preferences_sort_label": "Urutkan video berdasarkan: ",
"published": "dipublikasi", "published": "dipublikasi",
"published - reverse": "dipublikasi - sebaliknya", "published - reverse": "dipublikasi - terbalik",
"alphabetically": "menurut abjad", "alphabetically": "menurut abjad",
"alphabetically - reverse": "menurut abjad - sebaliknya", "alphabetically - reverse": "menurut abjad - terbalik",
"channel name": "nama kanal", "channel name": "nama kanal",
"channel name - reverse": "nama kanal - sebaliknya", "channel name - reverse": "nama kanal - terbalik",
"Only show latest video from channel: ": "Hanya tampilkan video terbaru dari kanal: ", "Only show latest video from channel: ": "Hanya tampilkan video terbaru dari kanal: ",
"Only show latest unwatched video from channel: ": "Hanya tampilkan video belum ditonton terbaru dari kanal: ", "Only show latest unwatched video from channel: ": "Hanya tampilkan video belum ditonton terbaru dari kanal: ",
"preferences_unseen_only_label": "Hanya tampilkan belum ditonton: ", "preferences_unseen_only_label": "Hanya tampilkan belum ditonton: ",
@ -106,7 +106,7 @@
"Enable web notifications": "Aktifkan pemberitahuan web", "Enable web notifications": "Aktifkan pemberitahuan web",
"`x` uploaded a video": "`x` mengunggah video", "`x` uploaded a video": "`x` mengunggah video",
"`x` is live": "`x` sedang siaran langsung", "`x` is live": "`x` sedang siaran langsung",
"preferences_category_data": "Preferensi Data", "preferences_category_data": "Preferensi data",
"Clear watch history": "Bersihkan riwayat tontonan", "Clear watch history": "Bersihkan riwayat tontonan",
"Import/export data": "Impor/Ekspor data", "Import/export data": "Impor/Ekspor data",
"Change password": "Ganti kata sandi", "Change password": "Ganti kata sandi",
@ -115,13 +115,13 @@
"Watch history": "Riwayat tontonan", "Watch history": "Riwayat tontonan",
"Delete account": "Hapus akun", "Delete account": "Hapus akun",
"preferences_category_admin": "Preferensi administrator", "preferences_category_admin": "Preferensi administrator",
"preferences_default_home_label": "Laman beranda default: ", "preferences_default_home_label": "Laman beranda baku: ",
"preferences_feed_menu_label": "Menu umpan: ", "preferences_feed_menu_label": "Menu umpan: ",
"preferences_show_nick_label": "Tampilkan nama panggilan di atas: ", "preferences_show_nick_label": "Tampilkan nama panggilan di atas: ",
"Top enabled: ": "Teratas diaktifkan: ", "Top enabled: ": "Teratas diaktifkan: ",
"CAPTCHA enabled: ": "CAPTCHA diaktifkan: ", "CAPTCHA enabled: ": "CAPTCHA diaktifkan: ",
"Login enabled: ": "Masuk diaktifkan: ", "Login enabled: ": "Masuk diaktifkan: ",
"Registration enabled: ": "Registrasi diaktifkan: ", "Registration enabled: ": "Pendaftaran diaktifkan: ",
"Report statistics: ": "Laporan statistik: ", "Report statistics: ": "Laporan statistik: ",
"Save preferences": "Simpan preferensi", "Save preferences": "Simpan preferensi",
"Subscription manager": "Pengatur langganan", "Subscription manager": "Pengatur langganan",
@ -161,7 +161,7 @@
"Title": "Judul", "Title": "Judul",
"Playlist privacy": "Privasi daftar putar", "Playlist privacy": "Privasi daftar putar",
"Editing playlist `x`": "Menyunting daftar putar `x`", "Editing playlist `x`": "Menyunting daftar putar `x`",
"Show more": "Tampilkan lainnya", "Show more": "Tampilkan lebih banyak",
"Show less": "Tampilkan lebih sedikit", "Show less": "Tampilkan lebih sedikit",
"Watch on YouTube": "Tonton di YouTube", "Watch on YouTube": "Tonton di YouTube",
"Switch Invidious Instance": "Ganti peladen Invidious", "Switch Invidious Instance": "Ganti peladen Invidious",
@ -175,9 +175,9 @@
"Engagement: ": "Keterlibatan: ", "Engagement: ": "Keterlibatan: ",
"Whitelisted regions: ": "Wilayah daftar-putih: ", "Whitelisted regions: ": "Wilayah daftar-putih: ",
"Blacklisted regions: ": "Wilayah daftar-hitam: ", "Blacklisted regions: ": "Wilayah daftar-hitam: ",
"Shared `x`": "Berbagi`x`", "Shared `x`": "Berbagi `x`",
"`x` views": { "`x` views": {
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` tampilan.([^.,0-9]|^)1([^.,0-9]|$)", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` tampilan",
"": "`x` tampilan" "": "`x` tampilan"
}, },
"Premieres in `x`": "Tayang dalam `x`", "Premieres in `x`": "Tayang dalam `x`",
@ -186,7 +186,7 @@
"View YouTube comments": "Lihat komentar YouTube", "View YouTube comments": "Lihat komentar YouTube",
"View more comments on Reddit": "Lihat lebih banyak komentar di Reddit", "View more comments on Reddit": "Lihat lebih banyak komentar di Reddit",
"View `x` comments": { "View `x` comments": {
"([^.,0-9]|^)1([^.,0-9]|$)": "Lihat`x` komentar.([^.,0-9]|^)1([^.,0-9]|$)", "([^.,0-9]|^)1([^.,0-9]|$)": "Lihat`x` komentar",
"": "Lihat`x` komentar" "": "Lihat`x` komentar"
}, },
"View Reddit comments": "Lihat komentar Reddit", "View Reddit comments": "Lihat komentar Reddit",
@ -368,7 +368,7 @@
"([^.,0-9]|^)1([^.,0-9]|$)": "`x` detik", "([^.,0-9]|^)1([^.,0-9]|$)": "`x` detik",
"": "`x` detik" "": "`x` detik"
}, },
"Fallback comments: ": "Komentar mundur: ", "Fallback comments: ": "Komentar alternatif: ",
"Popular": "Populer", "Popular": "Populer",
"Search": "Cari", "Search": "Cari",
"Top": "Teratas", "Top": "Teratas",
@ -376,7 +376,7 @@
"Rating: ": "Peringkat: ", "Rating: ": "Peringkat: ",
"preferences_locale_label": "Bahasa: ", "preferences_locale_label": "Bahasa: ",
"View as playlist": "Tampilkan sebagai daftar putar", "View as playlist": "Tampilkan sebagai daftar putar",
"Default": "Asali", "Default": "Baku",
"Music": "Musik", "Music": "Musik",
"Gaming": "Permainan", "Gaming": "Permainan",
"News": "Berita", "News": "Berita",

View file

@ -432,5 +432,6 @@
"adminprefs_modified_source_code_url_label": "編集したソースコードのレポジトリーURL", "adminprefs_modified_source_code_url_label": "編集したソースコードのレポジトリーURL",
"long": "20 分以上", "long": "20 分以上",
"preferences_region_label": "地域: ", "preferences_region_label": "地域: ",
"footer_donate_page": "寄付する" "footer_donate_page": "寄付する",
"preferences_quality_dash_label": "優先するDash画質 : "
} }

View file

@ -256,7 +256,7 @@
"Croatian": "Hırvatça", "Croatian": "Hırvatça",
"Czech": "Çekçe", "Czech": "Çekçe",
"Danish": "Danca", "Danish": "Danca",
"Dutch": "Flemenkçe", "Dutch": "Felemenkçe",
"Esperanto": "Esperanto", "Esperanto": "Esperanto",
"Estonian": "Estonca", "Estonian": "Estonca",
"Filipino": "Filipince", "Filipino": "Filipince",

View file

@ -40,11 +40,6 @@ module Invidious::Routes::Misc
def self.cross_instance_redirect(env) def self.cross_instance_redirect(env)
referer = get_referer(env) referer = 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_instance instance_url = fetch_random_instance
env.redirect "https://#{instance_url}#{referer}" env.redirect "https://#{instance_url}#{referer}"
end end

View file

@ -45,7 +45,11 @@
<div class="pure-u-1-3"> <div class="pure-u-1-3">
<a href="https://www.youtube.com/channel/<%= ucid %>"><%= translate(locale, "View channel on YouTube") %></a> <a href="https://www.youtube.com/channel/<%= ucid %>"><%= translate(locale, "View channel on YouTube") %></a>
<div class="pure-u-1 pure-md-1-3"> <div class="pure-u-1 pure-md-1-3">
<a href="/redirect?referer=<%= env.get?("current_page") %>"><%= translate(locale, "Switch Invidious Instance") %></a> <% if env.get("preferences").as(Preferences).automatic_instance_redirect%>
<a href="/redirect?referer=<%= env.get?("current_page") %>"><%= translate(locale, "Switch Invidious Instance") %></a>
<% else %>
<a href="https://redirect.invidious.io<%= env.request.path %>"><%= translate(locale, "Switch Invidious Instance") %></a>
<% end %>
</div> </div>
<% if !channel.auto_generated %> <% if !channel.auto_generated %>
<div class="pure-u-1 pure-md-1-3"> <div class="pure-u-1 pure-md-1-3">

View file

@ -44,7 +44,11 @@
<div class="pure-u-1-3"> <div class="pure-u-1-3">
<a href="https://www.youtube.com/channel/<%= channel.ucid %>/community"><%= translate(locale, "View channel on YouTube") %></a> <a href="https://www.youtube.com/channel/<%= channel.ucid %>/community"><%= translate(locale, "View channel on YouTube") %></a>
<div class="pure-u-1 pure-md-1-3"> <div class="pure-u-1 pure-md-1-3">
<a href="/redirect?referer=<%= env.get?("current_page") %>"><%= translate(locale, "Switch Invidious Instance") %></a> <% if env.get("preferences").as(Preferences).automatic_instance_redirect%>
<a href="/redirect?referer=<%= env.get?("current_page") %>"><%= translate(locale, "Switch Invidious Instance") %></a>
<% else %>
<a href="https://redirect.invidious.io<%= env.request.resource %>"><%= translate(locale, "Switch Invidious Instance") %></a>
<% end %>
</div> </div>
<% if !channel.auto_generated %> <% if !channel.auto_generated %>
<div class="pure-u-1 pure-md-1-3"> <div class="pure-u-1 pure-md-1-3">

View file

@ -79,19 +79,8 @@
<div class="flex-left"><a href="/channel/<%= item.ucid %>"> <div class="flex-left"><a href="/channel/<%= item.ucid %>">
<p class="channel-name" dir="auto"><%= HTML.escape(item.author) %></p> <p class="channel-name" dir="auto"><%= HTML.escape(item.author) %></p>
</a></div> </a></div>
<div class="flex-right"> <% endpoint_params = "?v=#{item.id}&list=#{item.plid}" %>
<div class="icon-buttons"> <%= rendered "components/video-context-buttons" %>
<a title="<%=translate(locale, "Watch on YouTube")%>" href="https://www.youtube.com/watch?v=<%= item.id %>&list=<%= item.plid %>">
<i class="icon ion-logo-youtube"></i>
</a>
<a title="<%=translate(locale, "Audio mode")%>" href="/watch?v=<%= item.id %>&list=<%= item.plid %>&amp;listen=1">
<i class="icon ion-md-headset"></i>
</a>
<a title="<%=translate(locale, "Switch Invidious Instance")%>" href="/redirect?referer=<%=URI.encode_www_form("watch?v=#{item.id}&list=#{item.plid}")%>">
<i class="icon ion-md-jet"></i>
</a>
</div>
</div>
</div> </div>
<div class="video-card-row flexible"> <div class="video-card-row flexible">
@ -155,19 +144,9 @@
<div class="flex-left"><a href="/channel/<%= item.ucid %>"> <div class="flex-left"><a href="/channel/<%= item.ucid %>">
<p class="channel-name" dir="auto"><%= HTML.escape(item.author) %></p> <p class="channel-name" dir="auto"><%= HTML.escape(item.author) %></p>
</a></div> </a></div>
<div class="flex-right">
<div class="icon-buttons"> <% endpoint_params = "?v=#{item.id}" %>
<a title="<%=translate(locale, "Watch on YouTube")%>" href="https://www.youtube.com/watch?v=<%= item.id %>"> <%= rendered "components/video-context-buttons" %>
<i class="icon ion-logo-youtube"></i>
</a>
<a title="<%=translate(locale, "Audio mode")%>" href="/watch?v=<%= item.id %>&amp;listen=1">
<i class="icon ion-md-headset"></i>
</a>
<a title="<%=translate(locale, "Switch Invidious Instance")%>" href="/redirect?referer=<%=URI.encode_www_form("watch?v=#{item.id}")%>">
<i class="icon ion-md-jet"></i>
</a>
</div>
</div>
</div> </div>
<div class="video-card-row flexible"> <div class="video-card-row flexible">

View file

@ -0,0 +1,21 @@
<div class="flex-right">
<div class="icon-buttons">
<a title="<%=translate(locale, "Watch on YouTube")%>" href="https://www.youtube.com/watch<%=endpoint_params%>">
<i class="icon ion-logo-youtube"></i>
</a>
<a title="<%=translate(locale, "Audio mode")%>" href="/watch<%=endpoint_params%>&listen=1">
<i class="icon ion-md-headset"></i>
</a>
<% if env.get("preferences").as(Preferences).automatic_instance_redirect%>
<a title="<%=translate(locale, "Switch Invidious Instance")%>" href="/redirect?referer=%2Fwatch<%=URI.encode_www_form(endpoint_params)%>">
<i class="icon ion-md-jet"></i>
</a>
<% else %>
<a title="<%=translate(locale, "Switch Invidious Instance")%>" href="https://redirect.invidious.io/watch<%=endpoint_params%>">
<i class="icon ion-md-jet"></i>
</a>
<% end %>
</div>
</div>

View file

@ -41,9 +41,16 @@
<%= translate(locale, "View playlist on YouTube") %> <%= translate(locale, "View playlist on YouTube") %>
</a> </a>
<span> | </span> <span> | </span>
<a href="/redirect?referer=<%= env.get?("current_page") %>">
<%= translate(locale, "Switch Invidious Instance") %> <% if env.get("preferences").as(Preferences).automatic_instance_redirect%>
</a> <a href="/redirect?referer=<%= env.get?("current_page") %>">
<%= translate(locale, "Switch Invidious Instance") %>
</a>
<% else %>
<a href="https://redirect.invidious.io<%= env.request.resource %>">
<%= translate(locale, "Switch Invidious Instance") %>
</a>
<% end %>
</div> </div>
<% end %> <% end %>
</div> </div>

View file

@ -47,7 +47,11 @@
</div> </div>
<div class="pure-u-1 pure-md-1-3"> <div class="pure-u-1 pure-md-1-3">
<a href="/redirect?referer=<%= env.get?("current_page") %>"><%= translate(locale, "Switch Invidious Instance") %></a> <% if env.get("preferences").as(Preferences).automatic_instance_redirect%>
<a href="/redirect?referer=<%= env.get?("current_page") %>"><%= translate(locale, "Switch Invidious Instance") %></a>
<% else %>
<a href="https://redirect.invidious.io<%= env.request.resource %>"><%= translate(locale, "Switch Invidious Instance") %></a>
<% end %>
</div> </div>
<div class="pure-u-1 pure-md-1-3"> <div class="pure-u-1 pure-md-1-3">

View file

@ -11,7 +11,7 @@
<meta property="og:url" content="<%= HOST_URL %>/watch?v=<%= video.id %>"> <meta property="og:url" content="<%= HOST_URL %>/watch?v=<%= video.id %>">
<meta property="og:title" content="<%= title %>"> <meta property="og:title" content="<%= title %>">
<meta property="og:image" content="/vi/<%= video.id %>/maxres.jpg"> <meta property="og:image" content="/vi/<%= video.id %>/maxres.jpg">
<meta property="og:description" content="<%= video.short_description %>"> <meta property="og:description" content="<%= HTML.escape(video.short_description) %>">
<meta property="og:type" content="video.other"> <meta property="og:type" content="video.other">
<meta property="og:video:url" content="<%= HOST_URL %>/embed/<%= video.id %>"> <meta property="og:video:url" content="<%= HOST_URL %>/embed/<%= video.id %>">
<meta property="og:video:secure_url" content="<%= HOST_URL %>/embed/<%= video.id %>"> <meta property="og:video:secure_url" content="<%= HOST_URL %>/embed/<%= video.id %>">
@ -22,7 +22,7 @@
<meta name="twitter:site" content="@omarroth1"> <meta name="twitter:site" content="@omarroth1">
<meta name="twitter:url" content="<%= HOST_URL %>/watch?v=<%= video.id %>"> <meta name="twitter:url" content="<%= HOST_URL %>/watch?v=<%= video.id %>">
<meta name="twitter:title" content="<%= title %>"> <meta name="twitter:title" content="<%= title %>">
<meta name="twitter:description" content="<%= video.short_description %>"> <meta name="twitter:description" content="<%= HTML.escape(video.short_description) %>">
<meta name="twitter:image" content="<%= HOST_URL %>/vi/<%= video.id %>/maxres.jpg"> <meta name="twitter:image" content="<%= HOST_URL %>/vi/<%= video.id %>/maxres.jpg">
<meta name="twitter:player" content="<%= HOST_URL %>/embed/<%= video.id %>"> <meta name="twitter:player" content="<%= HOST_URL %>/embed/<%= video.id %>">
<meta name="twitter:player:width" content="1280"> <meta name="twitter:player:width" content="1280">
@ -116,7 +116,11 @@ we're going to need to do it here in order to allow for translations.
(<a href="https://www.youtube.com/embed/<%= video.id %>"><%= translate(locale, "Embed") %></a>) (<a href="https://www.youtube.com/embed/<%= video.id %>"><%= translate(locale, "Embed") %></a>)
</span> </span>
<p id="watch-on-another-invidious-instance"> <p id="watch-on-another-invidious-instance">
<% if env.get("preferences").as(Preferences).automatic_instance_redirect%>
<a href="/redirect?referer=<%= env.get?("current_page") %>"><%= translate(locale, "Switch Invidious Instance") %></a> <a href="/redirect?referer=<%= env.get?("current_page") %>"><%= translate(locale, "Switch Invidious Instance") %></a>
<% else %>
<a href="https://redirect.invidious.io<%= env.request.resource %>"><%= translate(locale, "Switch Invidious Instance") %></a>
<% end %>
</p> </p>
<p id="embed-link"> <p id="embed-link">
<a href="<%= embed_link %>"><%= translate(locale, "Embed Link") %></a> <a href="<%= embed_link %>"><%= translate(locale, "Embed Link") %></a>