File tree Expand file tree Collapse file tree
app/src/main/java/com/github/libretube/repo Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import org.schabi.newpipe.extractor.channel.tabs.ChannelTabInfo
2121import org.schabi.newpipe.extractor.channel.tabs.ChannelTabs
2222import org.schabi.newpipe.extractor.feed.FeedInfo
2323import org.schabi.newpipe.extractor.stream.StreamInfoItem
24+ import org.schabi.newpipe.extractor.stream.StreamInfoItem.ContentAvailability
2425import java.time.Duration
2526import java.time.Instant
2627import java.util.concurrent.atomic.AtomicInteger
@@ -146,6 +147,7 @@ class LocalFeedRepository : FeedRepository {
146147 ChannelTabInfo .getInfo(NewPipeExtractorInstance .extractor, tab).relatedItems
147148 }.getOrElse { emptyList() }
148149 }.flatten().filterIsInstance<StreamInfoItem >()
150+ .filter { it.contentAvailability == ContentAvailability .AVAILABLE || it.contentAvailability == ContentAvailability .UPCOMING }
149151
150152 val channelAvatar = channelInfo.avatars.maxByOrNull { it.height }?.url
151153 return related.map { item ->
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ buildscript {
1818
1919allprojects {
2020 repositories {
21+ mavenLocal()
2122 google()
2223 mavenCentral()
2324 maven { setUrl(" https://jitpack.io" ) }
You can’t perform that action at this time.
0 commit comments