From 502b5fba17515af37488dd19f829748018a775ae Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Sat, 25 Feb 2017 16:04:03 -0700 Subject: [PATCH] Fix #257 Playlist download dups Signed-off-by: Andrew DeMaria --- .../org/libresonic/player/controller/DownloadController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libresonic-main/src/main/java/org/libresonic/player/controller/DownloadController.java b/libresonic-main/src/main/java/org/libresonic/player/controller/DownloadController.java index c25c95a4..a90ab936 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/controller/DownloadController.java +++ b/libresonic-main/src/main/java/org/libresonic/player/controller/DownloadController.java @@ -43,7 +43,9 @@ import javax.servlet.http.HttpServletResponse; import java.io.*; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashSet; import java.util.List; +import java.util.Set; import java.util.zip.CRC32; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; @@ -220,7 +222,7 @@ public class DownloadController implements LastModified { ZipOutputStream out = new ZipOutputStream(RangeOutputStream.wrap(response.getOutputStream(), range)); out.setMethod(ZipOutputStream.STORED); // No compression. - List filesToDownload = new ArrayList(); + Set filesToDownload = new HashSet<>(); if (indexes == null) { filesToDownload.addAll(files); } else {