Merge 8c7411544411312ff5c15f1ba6d7ee32ed352b6a into 7e36cfb6678770db8a55e575caddd981dce2d032

This commit is contained in:
Ekansh Sharma 2026-01-22 01:29:10 +00:00 committed by GitHub
commit b0507ddf50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -330,6 +330,9 @@ module Invidious::Routes::Watch
env.params.query["title"] = filename env.params.query["title"] = filename
env.params.query["label"] = URI.decode_www_form(label.as_s) env.params.query["label"] = URI.decode_www_form(label.as_s)
# Set content disposition header to force download
env.response.headers["Content-Disposition"] = "attachment; filename=\"#{filename}\""
return Invidious::Routes::API::V1::Videos.captions(env) return Invidious::Routes::API::V1::Videos.captions(env)
elsif itag = download_widget["itag"]?.try &.as_i.to_s elsif itag = download_widget["itag"]?.try &.as_i.to_s
# URL params specific to /latest_version # URL params specific to /latest_version