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