Merge pull request #7113 from FineFindus/feat/filter-members-videos

feat(LocalFeedRepository): filter members only videos
This commit is contained in:
FineFindus 2025-04-15 20:22:49 +02:00 committed by GitHub
commit 51ab53325b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -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 ->

View File

@ -18,6 +18,7 @@ buildscript {
allprojects {
repositories {
mavenLocal()
google()
mavenCentral()
maven { setUrl("https://jitpack.io") }