diff --git a/src/main/java/device/cdPlayer/CDPlayer.java b/src/main/java/device/cdPlayer/CDPlayer.java index 209e646..ff1caf2 100644 --- a/src/main/java/device/cdPlayer/CDPlayer.java +++ b/src/main/java/device/cdPlayer/CDPlayer.java @@ -42,7 +42,10 @@ public class CDPlayer implements Device { @Override public void next() { + List playList = Arrays.asList(loadedCD.getPlayList()); + int indexOfActualPlayTrack=playList.indexOf(actualPlayTrack); + this.actualPlayTrack=playList.get(indexOfActualPlayTrack +1); } @Override @@ -115,7 +118,8 @@ public class CDPlayer implements Device { } public String getSongByNumber(int songNr){ - return ""; + List playList = Arrays.asList(loadedCD.getPlayList()); + return playList.get(songNr); } public String getActualPlayTrack() {