mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 07:20:30 +05:30
Merge pull request #7113 from FineFindus/feat/filter-members-videos
feat(LocalFeedRepository): filter members only videos
This commit is contained in:
commit
51ab53325b
@ -21,6 +21,7 @@ import org.schabi.newpipe.extractor.channel.tabs.ChannelTabInfo
|
||||
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabs
|
||||
import org.schabi.newpipe.extractor.feed.FeedInfo
|
||||
import org.schabi.newpipe.extractor.stream.StreamInfoItem
|
||||
import org.schabi.newpipe.extractor.stream.StreamInfoItem.ContentAvailability
|
||||
import java.time.Duration
|
||||
import java.time.Instant
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
@ -146,6 +147,7 @@ class LocalFeedRepository : FeedRepository {
|
||||
ChannelTabInfo.getInfo(NewPipeExtractorInstance.extractor, tab).relatedItems
|
||||
}.getOrElse { emptyList() }
|
||||
}.flatten().filterIsInstance<StreamInfoItem>()
|
||||
.filter { it.contentAvailability == ContentAvailability.AVAILABLE || it.contentAvailability == ContentAvailability.UPCOMING }
|
||||
|
||||
val channelAvatar = channelInfo.avatars.maxByOrNull { it.height }?.url
|
||||
return related.map { item ->
|
||||
|
@ -18,6 +18,7 @@ buildscript {
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { setUrl("https://jitpack.io") }
|
||||
|
Loading…
x
Reference in New Issue
Block a user