mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50:31 +05:30
Merge pull request #5399 from Bnyro/master
fix: don't auto-add live videos to the playing queue
This commit is contained in:
commit
06ac0ab6a5
@ -24,6 +24,8 @@ data class StreamItem(
|
||||
val shortDescription: String? = null,
|
||||
val isShort: Boolean = false
|
||||
) : Parcelable {
|
||||
val isLive get() = (duration ?: 0L) < 0L
|
||||
|
||||
fun toLocalPlaylistItem(playlistId: String): LocalPlaylistItem {
|
||||
return LocalPlaylistItem(
|
||||
playlistId = playlistId.toInt(),
|
||||
|
@ -212,7 +212,7 @@ object PlayingQueue {
|
||||
// don't add new videos to the queue if the user chose to repeat only the current queue
|
||||
if (isLast() && repeatMode == Player.REPEAT_MODE_ALL) return
|
||||
|
||||
add(*streams.toTypedArray(), skipExisting = true)
|
||||
add(*streams.filter { !it.isLive }.toTypedArray(), skipExisting = true)
|
||||
}
|
||||
|
||||
fun onQueueItemSelected(index: Int) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user