content-disposition-header added

This commit is contained in:
ekansh sharma 2025-04-10 00:56:50 +05:30
parent 0c07e9d27a
commit 8c74115444

View File

@ -321,6 +321,9 @@ module Invidious::Routes::Watch
env.params.query["title"] = filename
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)
elsif itag = download_widget["itag"]?.try &.as_i.to_s
# URL params specific to /latest_version