|
@ -213,8 +213,14 @@ public class RadioPlayer implements Device { |
|
|
|
|
|
|
|
|
public String changeOrderInSavedPlaylist(int nr) { |
|
|
public String changeOrderInSavedPlaylist(int nr) { |
|
|
String station = playedStation; |
|
|
String station = playedStation; |
|
|
|
|
|
if((nr-1) > savedPlaylist.size()) { |
|
|
savedPlaylist.remove(playedStation); |
|
|
savedPlaylist.remove(playedStation); |
|
|
savedPlaylist.add(nr-1,station); |
|
|
|
|
|
|
|
|
savedPlaylist.add(savedPlaylist.size(),station); |
|
|
return"Station " + playedStation + " is now on place 0" + nr + "in saved playlist"; |
|
|
return"Station " + playedStation + " is now on place 0" + nr + "in saved playlist"; |
|
|
|
|
|
} else { |
|
|
|
|
|
savedPlaylist.remove(playedStation); |
|
|
|
|
|
savedPlaylist.add(nr - 1, station); |
|
|
|
|
|
return "Station " + playedStation + " is now on place 0" + (savedPlaylist.size()+1) + "in saved playlist"; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |