Use the file ID instead of the title for filenames

Otherwise, titles can be too long and cause save failures
This commit is contained in:
Ronnie 2021-05-11 19:36:59 -07:00 committed by GitHub
parent 24348c16d7
commit 3323ecfbc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,7 +113,7 @@ func getMediaResults(r *http.Request) (MediaResults, error) {
func downloadMedia(url string) (string, error) { func downloadMedia(url string) (string, error) {
// The id will be used as the name of the parent directory of the output files // The id will be used as the name of the parent directory of the output files
id := GetMD5Hash(url) id := GetMD5Hash(url)
name := getMediaDirectory(id) + "%(title)s.%(ext)s" name := getMediaDirectory(id) + "%(id)s.%(ext)s"
log.Info().Msgf("Downloading %s to %s", url, id) log.Info().Msgf("Downloading %s to %s", url, id)