Merge branch 'master' of gitlab.futo.org:videostreaming/grayjay

This commit is contained in:
Koen 2024-01-16 20:08:15 +01:00
commit 9b64cde17d
5 changed files with 14 additions and 5 deletions

View file

@ -1003,6 +1003,9 @@ class VideoDetailView : ConstraintLayout {
fun setVideo(url: String, resumeSeconds: Long = 0, playWhenReady: Boolean = true) { fun setVideo(url: String, resumeSeconds: Long = 0, playWhenReady: Boolean = true) {
Logger.i(TAG, "setVideo url=$url resumeSeconds=$resumeSeconds playWhenReady=$playWhenReady") Logger.i(TAG, "setVideo url=$url resumeSeconds=$resumeSeconds playWhenReady=$playWhenReady")
if(this.video?.url == url)
return;
_searchVideo = null; _searchVideo = null;
video = null; video = null;
_playbackTracker = null; _playbackTracker = null;
@ -1033,6 +1036,9 @@ class VideoDetailView : ConstraintLayout {
fun setVideoOverview(video: IPlatformVideo, fetch: Boolean = true, resumeSeconds: Long = 0) { fun setVideoOverview(video: IPlatformVideo, fetch: Boolean = true, resumeSeconds: Long = 0) {
Logger.i(TAG, "setVideoOverview") Logger.i(TAG, "setVideoOverview")
if(this.video?.url == video.url)
return;
val cachedVideo = StateDownloads.instance.getCachedVideo(video.id); val cachedVideo = StateDownloads.instance.getCachedVideo(video.id);
if(cachedVideo != null) { if(cachedVideo != null) {
setVideoDetails(cachedVideo, true); setVideoDetails(cachedVideo, true);
@ -1131,6 +1137,9 @@ class VideoDetailView : ConstraintLayout {
fun setVideoDetails(videoDetail: IPlatformVideoDetails, newVideo: Boolean = false) { fun setVideoDetails(videoDetail: IPlatformVideoDetails, newVideo: Boolean = false) {
Logger.i(TAG, "setVideoDetails (${videoDetail.name})") Logger.i(TAG, "setVideoDetails (${videoDetail.name})")
if(newVideo && this.video?.url == videoDetail.url)
return;
if (newVideo) { if (newVideo) {
_lastVideoSource = null; _lastVideoSource = null;
_lastAudioSource = null; _lastAudioSource = null;
@ -2551,7 +2560,7 @@ class VideoDetailView : ConstraintLayout {
} }
else else
withContext(Dispatchers.Main) { withContext(Dispatchers.Main) {
setVideoDetails(videoDetail); setVideoDetails(videoDetail, true);
_liveTryJob = null; _liveTryJob = null;
} }
} }

@ -1 +1 @@
Subproject commit 139444608dbd561a317fc4666dfe01b868335e80 Subproject commit bc13b38411bdb8ad7c48d869ec9bc2068e671bd0

@ -1 +1 @@
Subproject commit b7864b910172659d29602f05d968427bffcc95f0 Subproject commit c86c73db0cdde3371c7944dd82c34ea4e5c725d9

@ -1 +1 @@
Subproject commit 139444608dbd561a317fc4666dfe01b868335e80 Subproject commit bc13b38411bdb8ad7c48d869ec9bc2068e671bd0

@ -1 +1 @@
Subproject commit b7864b910172659d29602f05d968427bffcc95f0 Subproject commit c86c73db0cdde3371c7944dd82c34ea4e5c725d9