Fix #257 Playlist download dups

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
master
Andrew DeMaria 8 years ago
parent b72c513c6a
commit 502b5fba17
No known key found for this signature in database
GPG Key ID: 0A3F5E91F8364EDF
  1. 4
      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<MediaFile> filesToDownload = new ArrayList<MediaFile>();
Set<MediaFile> filesToDownload = new HashSet<>();
if (indexes == null) {
filesToDownload.addAll(files);
} else {

Loading…
Cancel
Save