Merge pull request #3853 from Bnyro/master

Add feed filter for livestreams
This commit is contained in:
Bnyro 2023-05-30 12:20:55 +02:00 committed by GitHub
commit 0c6f84b39e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -220,10 +220,12 @@ class SubscriptionsFragment : Fragment() {
}
.filter {
// apply the selected filter
val isLive = (it.duration ?: -1L) < 0L
when (selectedFilter) {
0 -> true
1 -> !it.isShort
1 -> !it.isShort && !isLive
2 -> it.isShort
3 -> isLive
else -> throw IllegalArgumentException()
}
}.let { streams ->

View File

@ -284,6 +284,7 @@
<item>@string/all</item>
<item>@string/videos</item>
<item>@string/yt_shorts</item>
<item>@string/livestreams</item>
</string-array>
<string-array name="playlistSortOptions">