fix item details for playlist songs

This commit is contained in:
dkanada 2020-10-27 01:57:21 +09:00
commit c0c02c42b9
2 changed files with 3 additions and 1 deletions

View file

@ -193,7 +193,7 @@ public class MediaButtonIntentReceiver extends BroadcastReceiver {
if (mWakeLock == null) {
Context appContext = context.getApplicationContext();
PowerManager pm = (PowerManager) appContext.getSystemService(Context.POWER_SERVICE);
mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Phonograph headset button");
mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, context.getClass().getName());
mWakeLock.setReferenceCounted(false);
}

View file

@ -11,6 +11,7 @@ import org.jellyfin.apiclient.interaction.Response;
import org.jellyfin.apiclient.model.dto.BaseItemDto;
import org.jellyfin.apiclient.model.playlists.PlaylistCreationRequest;
import org.jellyfin.apiclient.model.playlists.PlaylistItemQuery;
import org.jellyfin.apiclient.model.querying.ItemFields;
import org.jellyfin.apiclient.model.querying.ItemsResult;
import java.util.ArrayList;
@ -19,6 +20,7 @@ import java.util.List;
public class PlaylistUtil {
public static void getPlaylist(PlaylistItemQuery query, MediaCallback callback) {
query.setUserId(App.getApiClient().getCurrentUserId());
query.setFields(new ItemFields[]{ItemFields.MediaSources});
App.getApiClient().GetPlaylistItems(query, new Response<ItemsResult>() {
@Override
public void onResponse(ItemsResult result) {