Skip to content

Fix Playlist Random play bug

Unnecessary instance creation

@@ -558,1 +558,1 @@
-                        random = Random(System.currentTimeMillis())
+                        random.setSeed(System.currentTimeMillis())

Unnecessary code

@@ -561,1 @@
-                random = Random(System.currentTimeMillis())

Fix previous indexes when expand list

@@ +615,7 @@
+            if (shuffling && ml.count > 1 && !previous.isEmpty()) {
+                for (i in 0 until previous.size) {
+                    if (previous[i] > index) {
+                        previous[i] += ml.count - 1
+                    }
+                }
+            }

alltimes play the top when expand list

@@ -616,1 +622,5 @@
-            ret = index
+            if (shuffling && ml.count > 1) {
+                ret = index + random.nextInt(ml.count)
+            } else {
+                ret = index
+            }

Merge request reports

Loading