Captions download filenames

Prompted by this question: Could someone help with how to use the closed caption files?

I see that the link for subtitle downloads includes the download attribute (download=“English.srt”) which should rename the file but that doesn’t work. Instead we get the hash filename (example: bcca6d9d-78c6-4e9f-874b-6b0cc9969257-930e56fa.srt).

A little bit of research tells me that the download attribute only works when the target file is on the same origin, and the filesize is discoverable. It definitely fails the first case (I don’t know the second), so this is a bug report that becomes a bit of a feature request.

I guess you’ll need to create a proxy download script page, which takes in the target URL as well as the intended name, and that page streams the file so it behaves like a direct link.

I’d also want to add that the intended filename should probably match the video file as well, so instead of simply “English.srt” it would be something like “Reptilicus-English.srt”

2 Likes

And because we all know I love typing stuff, here’s my demo of how that might be done:

https://www.planga-la.com/stuff/mst3k/caption_download.php

2 Likes