From 959c192762d560e6b6194d722de7277bb0e2e3fe Mon Sep 17 00:00:00 2001 From: Kelvin Date: Fri, 19 Apr 2024 22:40:13 +0200 Subject: [PATCH] Fix channel content not showing older non-videos, fix seperated channel contents not being fetched if not both streams and videos are included --- .../fragment/channel/tab/ChannelContentsFragment.kt | 6 +++--- .../java/com/futo/platformplayer/states/StatePlatform.kt | 7 +++++-- app/src/stable/assets/sources/patreon | 2 +- app/src/stable/assets/sources/youtube | 2 +- app/src/unstable/assets/sources/youtube | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/futo/platformplayer/fragment/channel/tab/ChannelContentsFragment.kt b/app/src/main/java/com/futo/platformplayer/fragment/channel/tab/ChannelContentsFragment.kt index a12b28c1..0647afed 100644 --- a/app/src/main/java/com/futo/platformplayer/fragment/channel/tab/ChannelContentsFragment.kt +++ b/app/src/main/java/com/futo/platformplayer/fragment/channel/tab/ChannelContentsFragment.kt @@ -105,9 +105,9 @@ class ChannelContentsFragment : Fragment(), IChannelTabFragment { }).success { setLoading(false); val posBefore = _results.size; - val toAdd = it.filter { it is IPlatformVideo }.map { it as IPlatformVideo } - _results.addAll(toAdd); - _adapterResults?.let { adapterVideo -> adapterVideo.notifyItemRangeInserted(adapterVideo.childToParentPosition(posBefore), toAdd.size); }; + //val toAdd = it.filter { it is IPlatformVideo }.map { it as IPlatformVideo } + _results.addAll(it); + _adapterResults?.let { adapterVideo -> adapterVideo.notifyItemRangeInserted(adapterVideo.childToParentPosition(posBefore), it.size); }; }.exception { Logger.w(TAG, "Failed to load next page.", it); UIDialogs.showGeneralRetryErrorDialog(requireContext(), it.message ?: "", it, { loadNextPage() }); diff --git a/app/src/main/java/com/futo/platformplayer/states/StatePlatform.kt b/app/src/main/java/com/futo/platformplayer/states/StatePlatform.kt index 4dabccbb..1a3132a3 100644 --- a/app/src/main/java/com/futo/platformplayer/states/StatePlatform.kt +++ b/app/src/main/java/com/futo/platformplayer/states/StatePlatform.kt @@ -676,8 +676,11 @@ class StatePlatform { val pagerResult: IPager; if(!clientCapabilities.hasType(ResultCapabilities.TYPE_MIXED) && - clientCapabilities.hasType(ResultCapabilities.TYPE_VIDEOS) && - clientCapabilities.hasType(ResultCapabilities.TYPE_STREAMS)) { + ( clientCapabilities.hasType(ResultCapabilities.TYPE_VIDEOS) || + clientCapabilities.hasType(ResultCapabilities.TYPE_STREAMS) || + clientCapabilities.hasType(ResultCapabilities.TYPE_LIVE) || + clientCapabilities.hasType(ResultCapabilities.TYPE_POSTS) + )) { val toQuery = mutableListOf(); if(clientCapabilities.hasType(ResultCapabilities.TYPE_VIDEOS)) toQuery.add(ResultCapabilities.TYPE_VIDEOS); diff --git a/app/src/stable/assets/sources/patreon b/app/src/stable/assets/sources/patreon index bc13b384..cee1fda4 160000 --- a/app/src/stable/assets/sources/patreon +++ b/app/src/stable/assets/sources/patreon @@ -1 +1 @@ -Subproject commit bc13b38411bdb8ad7c48d869ec9bc2068e671bd0 +Subproject commit cee1fda4e875a46315a9d4492e2e3b541d98f39f diff --git a/app/src/stable/assets/sources/youtube b/app/src/stable/assets/sources/youtube index bef199ba..cac27408 160000 --- a/app/src/stable/assets/sources/youtube +++ b/app/src/stable/assets/sources/youtube @@ -1 +1 @@ -Subproject commit bef199baa9df5cb3192c7a3f8baf8c57e9fbdaea +Subproject commit cac27408440f5586c1c68d846456792041403d35 diff --git a/app/src/unstable/assets/sources/youtube b/app/src/unstable/assets/sources/youtube index 940bb554..cac27408 160000 --- a/app/src/unstable/assets/sources/youtube +++ b/app/src/unstable/assets/sources/youtube @@ -1 +1 @@ -Subproject commit 940bb554d5fca5d8c3e2c6f501a74b7f03c9011b +Subproject commit cac27408440f5586c1c68d846456792041403d35