Skip to content
Snippets Groups Projects
Commit 9b64cde1 authored by Koen's avatar Koen
Browse files

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

parents f6931bcf a4ff47d8
No related branches found
No related tags found
No related merge requests found
......@@ -1003,6 +1003,9 @@ class VideoDetailView : ConstraintLayout {
fun setVideo(url: String, resumeSeconds: Long = 0, playWhenReady: Boolean = true) {
Logger.i(TAG, "setVideo url=$url resumeSeconds=$resumeSeconds playWhenReady=$playWhenReady")
if(this.video?.url == url)
return;
_searchVideo = null;
video = null;
_playbackTracker = null;
......@@ -1033,6 +1036,9 @@ class VideoDetailView : ConstraintLayout {
fun setVideoOverview(video: IPlatformVideo, fetch: Boolean = true, resumeSeconds: Long = 0) {
Logger.i(TAG, "setVideoOverview")
if(this.video?.url == video.url)
return;
val cachedVideo = StateDownloads.instance.getCachedVideo(video.id);
if(cachedVideo != null) {
setVideoDetails(cachedVideo, true);
......@@ -1131,6 +1137,9 @@ class VideoDetailView : ConstraintLayout {
fun setVideoDetails(videoDetail: IPlatformVideoDetails, newVideo: Boolean = false) {
Logger.i(TAG, "setVideoDetails (${videoDetail.name})")
if(newVideo && this.video?.url == videoDetail.url)
return;
if (newVideo) {
_lastVideoSource = null;
_lastAudioSource = null;
......@@ -2551,7 +2560,7 @@ class VideoDetailView : ConstraintLayout {
}
else
withContext(Dispatchers.Main) {
setVideoDetails(videoDetail);
setVideoDetails(videoDetail, true);
_liveTryJob = null;
}
}
......
Subproject commit 139444608dbd561a317fc4666dfe01b868335e80
Subproject commit bc13b38411bdb8ad7c48d869ec9bc2068e671bd0
Subproject commit b7864b910172659d29602f05d968427bffcc95f0
Subproject commit c86c73db0cdde3371c7944dd82c34ea4e5c725d9
Subproject commit 139444608dbd561a317fc4666dfe01b868335e80
Subproject commit bc13b38411bdb8ad7c48d869ec9bc2068e671bd0
Subproject commit b7864b910172659d29602f05d968427bffcc95f0
Subproject commit c86c73db0cdde3371c7944dd82c34ea4e5c725d9
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment