mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-01 07:03:35 +00:00
Removed unused database references
This commit is contained in:
@@ -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.Queue;
|
||||
import com.cappielloantonio.play.model.Song;
|
||||
import com.cappielloantonio.play.subsonic.models.AlbumID3;
|
||||
import com.cappielloantonio.play.subsonic.models.ArtistID3;
|
||||
@@ -40,4 +41,14 @@ public class MappingUtil {
|
||||
|
||||
return artists;
|
||||
}
|
||||
|
||||
public static ArrayList<Song> mapQueue(List<Queue> queueList) {
|
||||
ArrayList<Song> songs = new ArrayList();
|
||||
|
||||
for(Queue item : queueList){
|
||||
songs.add(new Song(item));
|
||||
}
|
||||
|
||||
return songs;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ public class QueueUtil {
|
||||
private static final String TAG = "QueueUtil";
|
||||
|
||||
public static Queue getQueueElementFromSong(Song song, int startingPosition) {
|
||||
return new Queue(startingPosition, song.getId());
|
||||
return new Queue(startingPosition, song.getId(), song.getTitle(), song.getAlbumId(), song.getAlbumName(), song.getArtistId(), song.getArtistName(), song.getPrimary());
|
||||
}
|
||||
|
||||
public static List<Queue> getQueueElementsFromSongs(List<Song> songs) {
|
||||
@@ -18,7 +18,7 @@ public class QueueUtil {
|
||||
List<Queue> queue = new ArrayList<>();
|
||||
|
||||
for (Song song : songs) {
|
||||
queue.add(new Queue(counter, song.getId()));
|
||||
queue.add(new Queue(counter, song.getId(), song.getTitle(), song.getAlbumId(), song.getAlbumName(), song.getArtistId(), song.getArtistName(), song.getPrimary()));
|
||||
counter++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user