diff --git a/app/src/main/java/com/yutou/nas_music_player/containers/MusicContainer.java b/app/src/main/java/com/yutou/nas_music_player/containers/MusicContainer.java index 57eac36..5a33f2f 100644 --- a/app/src/main/java/com/yutou/nas_music_player/containers/MusicContainer.java +++ b/app/src/main/java/com/yutou/nas_music_player/containers/MusicContainer.java @@ -30,12 +30,16 @@ import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Random; import java.util.Timer; import java.util.TimerTask; +import java.util.stream.Collectors; +import java.util.stream.Stream; public class MusicContainer { @@ -430,10 +434,10 @@ public class MusicContainer { public List getPlayList() { System.out.println("playList.size() = " + playList.size() + " tmpList.size() = " + tmpList.size()); - if (!tmpList.isEmpty()) { - return tmpList; - } - return playList; + List tmp=new ArrayList<>(); + tmp.addAll(tmpList); + tmp.addAll(playList); + return tmp; }