mirror of
https://github.com/antebudimir/tempus.git
synced 2026-04-15 16:27:26 +00:00
feat: implemented load queue, adding logging
This commit is contained in:
parent
27f5a47cc9
commit
1ff0b83a19
4 changed files with 92 additions and 25 deletions
|
|
@ -3,6 +3,7 @@ package com.cappielloantonio.tempo.viewmodel;
|
|||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.OptIn;
|
||||
|
|
@ -12,6 +13,7 @@ import androidx.lifecycle.LiveData;
|
|||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.media3.common.util.UnstableApi;
|
||||
import androidx.media3.session.MediaBrowser;
|
||||
|
||||
import com.cappielloantonio.tempo.interfaces.StarCallback;
|
||||
import com.cappielloantonio.tempo.model.Download;
|
||||
|
|
@ -291,13 +293,13 @@ public class PlayerBottomSheetViewModel extends AndroidViewModel {
|
|||
List<String> ids = queue.stream().map(Child::getId).collect(Collectors.toList());
|
||||
|
||||
if (media != null) {
|
||||
queueRepository.savePlayQueue(ids, media.getId(), 0);
|
||||
// TODO: We need to get the actual playback position here
|
||||
Log.d(TAG, "Saving play queue - Current: " + media.getId() + ", Items: " + ids.size());
|
||||
queueRepository.savePlayQueue(ids, media.getId(), 0); // Still hardcoded to 0 for now
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void observeCachedLyrics(LifecycleOwner owner, String songId) {
|
||||
if (TextUtils.isEmpty(songId)) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue