Merge pull request #4659 from ByteHamster/fix-playback
Fix using wrong playable object
This commit is contained in:
commit
29f46d97c0
|
@ -517,11 +517,12 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(
|
.subscribe(
|
||||||
playableLoaded -> {
|
playableLoaded -> {
|
||||||
mediaPlayer.playMediaObject(playable, stream, startWhenPrepared,
|
mediaPlayer.playMediaObject(playableLoaded, stream, startWhenPrepared,
|
||||||
prepareImmediately);
|
prepareImmediately);
|
||||||
addPlayableToQueue(playable);
|
addPlayableToQueue(playableLoaded);
|
||||||
}, error -> {
|
}, error -> {
|
||||||
Log.d(TAG, "Playable was not found. Stopping service.");
|
Log.d(TAG, "Playable was not found. Stopping service.");
|
||||||
|
error.printStackTrace();
|
||||||
stateManager.stopService();
|
stateManager.stopService();
|
||||||
});
|
});
|
||||||
return Service.START_NOT_STICKY;
|
return Service.START_NOT_STICKY;
|
||||||
|
@ -729,6 +730,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||||
addPlayableToQueue(playable);
|
addPlayableToQueue(playable);
|
||||||
}, error -> {
|
}, error -> {
|
||||||
Log.d(TAG, "Playable was not loaded from preferences. Stopping service.");
|
Log.d(TAG, "Playable was not loaded from preferences. Stopping service.");
|
||||||
|
error.printStackTrace();
|
||||||
stateManager.stopService();
|
stateManager.stopService();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue