Preparation to music streaming

This commit is contained in:
Antonio Cappiello 2020-12-08 11:12:44 +01:00
parent f837bb14e2
commit a28ad27288
23 changed files with 615 additions and 279 deletions

View file

@ -8,14 +8,14 @@ import java.util.List;
public class QueueUtil {
public static Queue getQueueElementFromSong(Song song) {
return new Queue(song.getId());
return new Queue(song.getId(), 0);
}
public static List<Queue> getQueueElementsFromSongs(List<Song> songs) {
List<Queue> queue = new ArrayList<>();
for(Song song: songs) {
queue.add(new Queue(song.getId()));
queue.add(new Queue(song.getId(), 0));
}
return queue;