Deduplication priorities fixed, playpause button change and wakelock on interruption fixed

This commit is contained in:
Kelvin 2024-01-13 00:51:00 +01:00
parent 9b48664de4
commit ea4fea4401
4 changed files with 10 additions and 3 deletions

View File

@ -1857,7 +1857,7 @@ class VideoDetailView : ConstraintLayout {
}
}
private fun c(playing: Boolean) {
private fun handlePlayChanged(playing: Boolean) {
Logger.i(TAG, "handlePlayChanged(playing=$playing)")
val ad = StateCasting.instance.activeDevice;

View File

@ -126,7 +126,7 @@ abstract class SubscriptionsTaskFetchAlgorithm(
val pager = MultiChronoContentPager(groupedPagers, allowFailure, 15);
pager.initialize();
return Result(DedupContentPager(pager), exs);
return Result(DedupContentPager(pager, StatePlatform.instance.getEnabledClients().map { it.id }), exs);
}
fun executeSubscriptionTasks(tasks: List<SubscriptionTask>, failedPlugins: MutableList<String>, cachedChannels: MutableList<String>): List<ForkJoinTask<SubscriptionTaskResult>> {

View File

@ -629,7 +629,10 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
}
}
override fun onPlay
override fun onIsPlayingChanged(playing: Boolean) {
super.onIsPlayingChanged(playing)
updatePlayPause();
}
override fun onPlaybackStateChanged(playbackState: Int) {
Logger.v(TAG, "onPlaybackStateChanged $playbackState");
updatePlayPause()

View File

@ -106,6 +106,7 @@ abstract class FutoVideoPlayerBase : RelativeLayout {
override fun onIsPlayingChanged(isPlaying: Boolean) {
super.onIsPlayingChanged(isPlaying);
this@FutoVideoPlayerBase.onIsPlayingChanged(isPlaying);
updatePlaying();
}
@ -625,6 +626,9 @@ abstract class FutoVideoPlayerBase : RelativeLayout {
}
protected open fun onSourceChanged(videoSource: IVideoSource?, audioSource: IAudioSource? = null, resume: Boolean = true) { }
protected open fun onIsPlayingChanged(playing: Boolean) {
}
protected open fun onPlaybackStateChanged(playbackState: Int) {
if (_shouldPlaybackRestartOnConnectivity && playbackState == ExoPlayer.STATE_READY) {
Logger.i(TAG, "_shouldPlaybackRestartOnConnectivity=false");