Skip to content

Commit e8673f4

Browse files
authored
Merge pull request libre-tube#7429 from FineFindus/fix/clear-stream
fix(player): clear current stream when closing player
2 parents dce392a + 1f10489 commit e8673f4

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)