Temporariyl disable video cache

This commit is contained in:
Kelvin 2024-09-06 18:46:26 +02:00
parent c6a3ff0a53
commit e529a3d34d
2 changed files with 3 additions and 2 deletions

View file

@ -545,7 +545,7 @@ class Settings : FragmentedStorageFileJson() {
class Browsing {
@FormField(R.string.enable_video_cache, FieldForm.TOGGLE, R.string.cache_to_quickly_load_previously_fetched_videos, 0)
@Serializable(with = FlexibleBooleanSerializer::class)
var videoCache: Boolean = true;
var videoCache: Boolean = false; //Temporary default disabled to prevent ui freeze?
}
@FormField(R.string.casting, "group", R.string.configure_casting, 9)

View file

@ -1334,6 +1334,7 @@ class VideoDetailView : ConstraintLayout {
setDescription(video.description.fixHtmlLinks());
_creatorThumbnail.setThumbnail(video.author.thumbnail, false);
val cachedPolycentricProfile = PolycentricCache.instance.getCachedProfile(video.author.url, true);
if (cachedPolycentricProfile != null) {
setPolycentricProfile(cachedPolycentricProfile, animate = false);
@ -1493,6 +1494,7 @@ class VideoDetailView : ConstraintLayout {
if(video.isLive && video.live == null && !video.video.videoSources.any())
startLiveTry(video);
_player.updateNextPrevious();
updateMoreButtons();
@ -1618,7 +1620,6 @@ class VideoDetailView : ConstraintLayout {
});
else
_player.setArtwork(null);
_player.setSource(videoSource, audioSource, _playWhenReady, false);
if(subtitleSource != null)
_player.swapSubtitles(fragment.lifecycleScope, subtitleSource);