mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-01 15:03:37 +00:00
Fix genre retrieval and filtering
This commit is contained in:
@@ -12,6 +12,7 @@ import com.cappielloantonio.play.subsonic.models.ArtistID3;
|
||||
import com.cappielloantonio.play.subsonic.models.ArtistInfo2;
|
||||
import com.cappielloantonio.play.subsonic.models.ArtistWithAlbumsID3;
|
||||
import com.cappielloantonio.play.subsonic.models.Child;
|
||||
import com.cappielloantonio.play.subsonic.models.Genre;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -106,4 +107,14 @@ public class MappingUtil {
|
||||
public static Download mapToDownload(Song song) {
|
||||
return new Download(song);
|
||||
}
|
||||
|
||||
public static ArrayList<com.cappielloantonio.play.model.Genre> mapGenre(List<Genre> genreList) {
|
||||
ArrayList<com.cappielloantonio.play.model.Genre> genres = new ArrayList();
|
||||
|
||||
for (Genre genre : genreList) {
|
||||
genres.add(new com.cappielloantonio.play.model.Genre(genre));
|
||||
}
|
||||
|
||||
return genres;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user