@@ 416,8 416,16 @@ function skipTrack(target, mediaType, doCmd) {
var trackTotal = t.length - 1;
- if ((!repeatAll) && (cmd === "fwd") && (Number(currentTrack) === trackTotal))
- return;
+ if ((!repeatAll) && (cmd === "fwd")) {
+ if (shuffle) {
+ // Don't allow a next if there are no more tracks left in the shuffled list.
+ if (orderHolder.getAttribute("data-randorder") === "")
+ return;
+
+ } else if (Number(currentTrack) === trackTotal) {
+ return;
+ }
+ }
if ((shuffle === "on") || (shuffleMobile === "on")) {
var randOrderString = orderHolder.getAttribute("data-randorder");