diff --git a/app/src/main/java/com/cappielloantonio/play/adapter/DiscoverSongAdapter.java b/app/src/main/java/com/cappielloantonio/play/adapter/DiscoverSongAdapter.java index c8fc7dc5..e39b4e53 100644 --- a/app/src/main/java/com/cappielloantonio/play/adapter/DiscoverSongAdapter.java +++ b/app/src/main/java/com/cappielloantonio/play/adapter/DiscoverSongAdapter.java @@ -16,6 +16,7 @@ import com.cappielloantonio.play.glide.CustomGlideRequest; import com.cappielloantonio.play.interfaces.MediaCallback; import com.cappielloantonio.play.model.Song; import com.cappielloantonio.play.repository.QueueRepository; +import com.cappielloantonio.play.repository.SongRepository; import com.cappielloantonio.play.service.MusicPlayerRemote; import com.cappielloantonio.play.ui.activity.MainActivity; import com.cappielloantonio.play.util.PreferenceUtil; @@ -85,8 +86,8 @@ public class DiscoverSongAdapter extends RecyclerView.Adapter mix = queueRepository.insertMix((ArrayList) media); activity.isBottomSheetInPeek(true); - activity.setBottomSheetMusicInfo(mix.get(0)); + activity.setBottomSheetMusicInfo((Song) media.get(0)); - MusicPlayerRemote.openQueue(mix, 0, true); + MusicPlayerRemote.openQueue((List) media, 0, true); } - }, SyncUtil.SONG, songs.get(getBindingAdapterPosition()).getId(), PreferenceUtil.getInstance(context).getInstantMixSongNumber()); + }); } } } \ No newline at end of file diff --git a/app/src/main/java/com/cappielloantonio/play/subsonic/models/SimilarSongs2.java b/app/src/main/java/com/cappielloantonio/play/subsonic/models/SimilarSongs2.java index d6e6f4e0..6bb90559 100644 --- a/app/src/main/java/com/cappielloantonio/play/subsonic/models/SimilarSongs2.java +++ b/app/src/main/java/com/cappielloantonio/play/subsonic/models/SimilarSongs2.java @@ -1,35 +1,24 @@ package com.cappielloantonio.play.subsonic.models; +import com.tickaroo.tikxml.annotation.Element; +import com.tickaroo.tikxml.annotation.Xml; + import java.util.ArrayList; import java.util.List; +@Xml public class SimilarSongs2 { + @Element(name = "song") protected List songs; - /** - * Gets the value of the songs property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the songs property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getSongs().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link Child } - */ public List getSongs() { if (songs == null) { - songs = new ArrayList(); + songs = new ArrayList<>(); } return this.songs; } + + public void setSongs(List songs) { + this.songs = songs; + } }