feat: add option to download video via AllTube

Introduced a new error message option to allow users to download videos using AllTube when they encounter issues. This update enhances user experience by providing an alternative to YouTube for video downloads.
This commit is contained in:
Kumi 2024-09-18 14:57:25 +02:00
parent 3b99a05b28
commit 743ba53822
Signed by: kumi
GPG key ID: ECBCC9082395383F
3 changed files with 6 additions and 0 deletions

View file

@ -349,6 +349,7 @@
"Current version: ": "Aktuelle Version: ", "Current version: ": "Aktuelle Version: ",
"next_steps_error_message": "Danach folgendes versuchen: ", "next_steps_error_message": "Danach folgendes versuchen: ",
"next_steps_error_message_refresh": "Aktualisieren", "next_steps_error_message_refresh": "Aktualisieren",
"next_steps_error_message_to_to_alltube": "Video mit AllTube herunterladen",
"next_steps_error_message_go_to_youtube": "Zu YouTube gehen", "next_steps_error_message_go_to_youtube": "Zu YouTube gehen",
"footer_donate_page": "Spende", "footer_donate_page": "Spende",
"search_filters_duration_option_long": "Lang (> 20 Minuten)", "search_filters_duration_option_long": "Lang (> 20 Minuten)",

View file

@ -460,6 +460,7 @@
"Current version: ": "Current version: ", "Current version: ": "Current version: ",
"next_steps_error_message": "After which you should try to: ", "next_steps_error_message": "After which you should try to: ",
"next_steps_error_message_refresh": "Refresh", "next_steps_error_message_refresh": "Refresh",
"next_steps_error_message_go_to_alltube": "Download the video using AllTube",
"next_steps_error_message_go_to_youtube": "Go to YouTube", "next_steps_error_message_go_to_youtube": "Go to YouTube",
"footer_donate_page": "Donate", "footer_donate_page": "Donate",
"footer_documentation": "Documentation", "footer_documentation": "Documentation",

View file

@ -177,6 +177,7 @@ def error_redirect_helper(env : HTTP::Server::Context)
request_path.starts_with?("/channel") || request_path.starts_with?("/playlist?list=PL") request_path.starts_with?("/channel") || request_path.starts_with?("/playlist?list=PL")
next_steps_text = translate(locale, "next_steps_error_message") next_steps_text = translate(locale, "next_steps_error_message")
refresh = translate(locale, "next_steps_error_message_refresh") refresh = translate(locale, "next_steps_error_message_refresh")
go_to_alltube = translate(locale, "next_steps_error_message_go_to_alltube")
go_to_youtube = translate(locale, "next_steps_error_message_go_to_youtube") go_to_youtube = translate(locale, "next_steps_error_message_go_to_youtube")
switch_instance = translate(locale, "Switch Invidious Instance") switch_instance = translate(locale, "Switch Invidious Instance")
@ -189,6 +190,9 @@ def error_redirect_helper(env : HTTP::Server::Context)
<li> <li>
<a href="/redirect?referer=#{env.get("current_page")}">#{switch_instance}</a> <a href="/redirect?referer=#{env.get("current_page")}">#{switch_instance}</a>
</li> </li>
<li>
<a href="https://alltube.private.coffee#{env.request.resource}">#{go_to_alltube}</a>
</li>
<li> <li>
<a rel="noreferrer noopener" href="https://youtube.com#{env.request.resource}">#{go_to_youtube}</a> <a rel="noreferrer noopener" href="https://youtube.com#{env.request.resource}">#{go_to_youtube}</a>
</li> </li>