main
JH 10 months ago
parent 375b517b20
commit 5fbe76ebd5

@ -42,7 +42,7 @@ public class S3Service {
String tempLyric = null; String tempLyric = null;
String format = String.format("%05d/%02d", Integer.parseInt(item.getJournalNo()), item.getSongNo()); String format = String.format("%05d/%02d", Integer.parseInt(item.getJournalNo()), item.getSongNo());
if (StringUtils.isNotBlank(item.getUrl())) { if (StringUtils.isNotBlank(item.getUrl())) {
String srcUrl = item.getUrl(); String srcUrl = Constants.SONG_KEY_PREFIX + item.getUrl();
String destUrlSuffix = format + srcUrl.substring(srcUrl.lastIndexOf(Constants.DOT)); String destUrlSuffix = format + srcUrl.substring(srcUrl.lastIndexOf(Constants.DOT));
String destUrl = Constants.MUSIC_KEY_PREFIX + destUrlSuffix; String destUrl = Constants.MUSIC_KEY_PREFIX + destUrlSuffix;
item.setUrl(destUrlSuffix); item.setUrl(destUrlSuffix);
@ -50,18 +50,18 @@ public class S3Service {
tempLyric = srcUrl; tempLyric = srcUrl;
} }
if (StringUtils.isNotBlank(item.getImage())) { if (StringUtils.isNotBlank(item.getImage())) {
String srcImage = item.getImage(); String srcImage = Constants.SONG_KEY_PREFIX + item.getImage();
String destImageSuffix = format + srcImage.substring(srcImage.lastIndexOf(Constants.DOT)); String destImageSuffix = format + srcImage.substring(srcImage.lastIndexOf(Constants.DOT));
String destImage = Constants.MUSIC_KEY_PREFIX + destImageSuffix; String destImage = Constants.MUSIC_KEY_PREFIX + destImageSuffix;
item.setImage(destImageSuffix); item.setImage(destImageSuffix);
copy(Constants.BUCKET, srcImage, destImage); copy(Constants.BUCKET, srcImage, destImage);
} }
if (StringUtils.isNotBlank(tempLyric)) { /*if (StringUtils.isNotBlank(tempLyric)) {
String srcLyric = tempLyric.substring(0, tempLyric.lastIndexOf(Constants.DOT)) + ".lyric"; String srcLyric = tempLyric.substring(0, tempLyric.lastIndexOf(Constants.DOT)) + ".lyric";
String destLyricSuffix = format + srcLyric.substring(srcLyric.lastIndexOf(Constants.DOT)); String destLyricSuffix = format + srcLyric.substring(srcLyric.lastIndexOf(Constants.DOT));
String destLyric = Constants.MUSIC_KEY_PREFIX + destLyricSuffix; String destLyric = Constants.MUSIC_KEY_PREFIX + destLyricSuffix;
copy(Constants.BUCKET, srcLyric, destLyric); copy(Constants.BUCKET, srcLyric, destLyric);
} }*/
} }
} }

Loading…
Cancel
Save