fix(watch_page): correct AllTube download link URL
Some checks are pending
Build and release container directly from master / release (push) Waiting to run
Invidious CI / build - crystal: 1.10.1, stable: true (push) Waiting to run
Invidious CI / build - crystal: 1.11.2, stable: true (push) Waiting to run
Invidious CI / build - crystal: 1.12.1, stable: true (push) Waiting to run
Invidious CI / build - crystal: 1.9.2, stable: true (push) Waiting to run
Invidious CI / build - crystal: nightly, stable: false (push) Waiting to run
Invidious CI / build-docker (push) Waiting to run
Invidious CI / build-docker-arm64 (push) Waiting to run
Invidious CI / ameba_lint (push) Waiting to run

Updated the AllTube download link to use the correct URL format by incorporating the video ID, ensuring that the download functionality correctly points to the intended video. This change addresses issues with previously malformed URLs.
This commit is contained in:
Kumi 2024-09-18 17:10:09 +02:00
parent 8158e430bf
commit 6ead64eed2
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -20,7 +20,7 @@ module Invidious::Frontend::WatchPage
def download_widget(locale : String, video : Video, video_assets : VideoAssets) : String
if CONFIG.alltube_url
return "<a href=\"#{CONFIG.alltube_url}#{env.request.resource}\" target=\"_blank\">#{translate(locale, "Download with AllTube")}</a>"
return "<a href=\"#{CONFIG.alltube_url}/watch?v=#{video.id}\" target=\"_blank\">#{translate(locale, "Download with AllTube")}</a>"
end
if CONFIG.disabled?("downloads")