mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 22:00:30 +05:30
fix: don't auto-add live videos to the playing queue
This commit is contained in:
parent
c28cbe7f11
commit
a6c82662c1
@ -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…
Reference in New Issue
Block a user