From 3323ecfbc7e720e99b79ae7667fa0737cde57d29 Mon Sep 17 00:00:00 2001 From: Ronnie Date: Tue, 11 May 2021 19:36:59 -0700 Subject: [PATCH] Use the file ID instead of the title for filenames Otherwise, titles can be too long and cause save failures --- src/media/fetch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/media/fetch.go b/src/media/fetch.go index 0ba05f5..9bf3828 100644 --- a/src/media/fetch.go +++ b/src/media/fetch.go @@ -113,7 +113,7 @@ func getMediaResults(r *http.Request) (MediaResults, error) { func downloadMedia(url string) (string, error) { // The id will be used as the name of the parent directory of the output files 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)