mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Implemented download service
This commit is contained in:
parent
f09d3b774d
commit
0e41cc20bd
9 changed files with 332 additions and 10 deletions
|
|
@ -2,6 +2,7 @@ package com.cappielloantonio.play.util;
|
|||
|
||||
import com.cappielloantonio.play.model.Album;
|
||||
import com.cappielloantonio.play.model.Artist;
|
||||
import com.cappielloantonio.play.model.Download;
|
||||
import com.cappielloantonio.play.model.Playlist;
|
||||
import com.cappielloantonio.play.model.Queue;
|
||||
import com.cappielloantonio.play.model.Song;
|
||||
|
|
@ -68,4 +69,28 @@ public class MappingUtil {
|
|||
|
||||
return playlist;
|
||||
}
|
||||
|
||||
public static ArrayList<Song> mapDownload(List<Download> downloads) {
|
||||
ArrayList<Song> songs = new ArrayList();
|
||||
|
||||
for(Download download : downloads){
|
||||
songs.add(new Song(download));
|
||||
}
|
||||
|
||||
return songs;
|
||||
}
|
||||
|
||||
public static ArrayList<Download> mapToDownload(List<Song> songs) {
|
||||
ArrayList<Download> downloads = new ArrayList();
|
||||
|
||||
for(Song song : songs){
|
||||
downloads.add(new Download(song));
|
||||
}
|
||||
|
||||
return downloads;
|
||||
}
|
||||
|
||||
public static Download mapToDownload(Song song) {
|
||||
return new Download(song);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue