From ea817b2520bb8afe7e2f2d38927889951c3e265c Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Tue, 21 Feb 2017 11:30:54 -0600 Subject: [PATCH] Update media S3 URL to include the year in the path. --- .../groovy/com/jdbernard/nlsongs/servlet/NLSongsContext.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service/src/main/groovy/com/jdbernard/nlsongs/servlet/NLSongsContext.groovy b/service/src/main/groovy/com/jdbernard/nlsongs/servlet/NLSongsContext.groovy index 6f81d79..896874e 100644 --- a/service/src/main/groovy/com/jdbernard/nlsongs/servlet/NLSongsContext.groovy +++ b/service/src/main/groovy/com/jdbernard/nlsongs/servlet/NLSongsContext.groovy @@ -11,7 +11,8 @@ public class NLSongsContext { public static String mediaBaseUrl public static String makeUrl(Service service, Song song) { - return mediaBaseUrl + '/' + service.localDate.toString('yyyy-MM-dd') + '_' + + return mediaBaseUrl + '/' + service.localDate.toString('yyyy') + "/" + + service.localDate.toString('yyyy-MM-dd') + '_' + service.serviceType.name().toLowerCase() + '_' + song.name.replaceAll(/[\s'"\\\/\?!]/, '') + '.mp3' } }