Merge pull request #9706 from Jared234/9131_bug_background_player
Fixed a bug that caused the background player to stop working
This commit is contained in:
commit
d8319716fc
4 changed files with 20 additions and 18 deletions
|
|
@ -865,7 +865,8 @@ public final class VideoDetailFragment
|
|||
if (playQueue == null) {
|
||||
playQueue = new SinglePlayQueue(result);
|
||||
}
|
||||
if (stack.isEmpty() || !stack.peek().getPlayQueue().equals(playQueue)) {
|
||||
if (stack.isEmpty() || !stack.peek().getPlayQueue()
|
||||
.equalStreams(playQueue)) {
|
||||
stack.push(new StackItem(serviceId, url, title, playQueue));
|
||||
}
|
||||
}
|
||||
|
|
@ -1779,7 +1780,7 @@ public final class VideoDetailFragment
|
|||
// deleted/added items inside Channel/Playlist queue and makes possible to have
|
||||
// a history of played items
|
||||
@Nullable final StackItem stackPeek = stack.peek();
|
||||
if (stackPeek != null && !stackPeek.getPlayQueue().equals(queue)) {
|
||||
if (stackPeek != null && !stackPeek.getPlayQueue().equalStreams(queue)) {
|
||||
@Nullable final PlayQueueItem playQueueItem = queue.getItem();
|
||||
if (playQueueItem != null) {
|
||||
stack.push(new StackItem(playQueueItem.getServiceId(), playQueueItem.getUrl(),
|
||||
|
|
@ -1845,7 +1846,7 @@ public final class VideoDetailFragment
|
|||
// They are not equal when user watches something in popup while browsing in fragment and
|
||||
// then changes screen orientation. In that case the fragment will set itself as
|
||||
// a service listener and will receive initial call to onMetadataUpdate()
|
||||
if (!queue.equals(playQueue)) {
|
||||
if (!queue.equalStreams(playQueue)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2102,7 +2103,7 @@ public final class VideoDetailFragment
|
|||
final Iterator<StackItem> iterator = stack.descendingIterator();
|
||||
while (iterator.hasNext()) {
|
||||
final StackItem next = iterator.next();
|
||||
if (next.getPlayQueue().equals(queue)) {
|
||||
if (next.getPlayQueue().equalStreams(queue)) {
|
||||
item = next;
|
||||
break;
|
||||
}
|
||||
|
|
@ -2117,7 +2118,7 @@ public final class VideoDetailFragment
|
|||
if (isClearingQueueConfirmationRequired(activity)
|
||||
&& playerIsNotStopped()
|
||||
&& activeQueue != null
|
||||
&& !activeQueue.equals(playQueue)) {
|
||||
&& !activeQueue.equalStreams(playQueue)) {
|
||||
showClearingQueueConfirmation(onAllow);
|
||||
} else {
|
||||
onAllow.run();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue