Skip to content

Commit 1f10489

Browse files
committed
fix(player): clear queue when closing player
Fixes an issue, where the `currentStream` was not cleared when closing the player. This could lead to an issue, where not all video options where displayed, even if the video was no longer playing. Ref: libre-tube@f262210
1 parent dce392a commit 1f10489

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

app/src/main/java/com/github/libretube/services/AbstractPlayerService.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ abstract class AbstractPlayerService : MediaLibraryService(), MediaLibrarySessio
409409
mediaLibrarySession = null
410410
}
411411

412+
PlayingQueue.clear()
413+
412414
ServiceCompat.stopForeground(this, ServiceCompat.STOP_FOREGROUND_REMOVE)
413415
stopSelf()
414416

app/src/main/java/com/github/libretube/util/PlayingQueue.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ object PlayingQueue {
3737
}
3838
queueJobs.clear()
3939
queue.clear()
40+
currentStream = null
4041
}
4142

4243
/**

0 commit comments

Comments
 (0)