From 3c8dfb84b555cb891a99758afd95a4bf28d0ba31 Mon Sep 17 00:00:00 2001 From: Duane Jaspers <37299563+DuaneJaspers@users.noreply.github.com> Date: Sat, 31 Oct 2020 15:57:51 +0100 Subject: [PATCH] Change to only consider currently live broadcasts as livestreams. (#728) * Remove isLiveContent, so only now live is true * Change Published on to Streamed on when applicable --- .../watch-video-info/watch-video-info.js | 18 ++++++++++++++++++ .../watch-video-info/watch-video-info.vue | 2 +- src/renderer/views/Watch/Watch.js | 4 +++- src/renderer/views/Watch/Watch.vue | 2 ++ static/locales/en-US.yaml | 2 ++ 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/watch-video-info/watch-video-info.js b/src/renderer/components/watch-video-info/watch-video-info.js index 192236ba..4d72257a 100644 --- a/src/renderer/components/watch-video-info/watch-video-info.js +++ b/src/renderer/components/watch-video-info/watch-video-info.js @@ -63,6 +63,14 @@ export default Vue.extend({ type: Function, required: true }, + isLive: { + type: Boolean, + required: false + }, + isLiveContent: { + type: Boolean, + required: true + }, isUpcoming: { type: Boolean, required: true @@ -177,6 +185,16 @@ export default Vue.extend({ const dateSplit = date.toDateString().split(' ') const localeDateString = `Video.Published.${dateSplit[1]}` return `${this.$t(localeDateString)} ${dateSplit[2]}, ${dateSplit[3]}` + }, + + publishedString() { + if (this.isLiveContent && this.isLive) { + return this.$t('Video.Started streaming on') + } else if (this.isLiveContent && !this.isLive) { + return this.$t('Video.Streamed on') + } else { + return this.$t('Video.Published on') + } } }, methods: { diff --git a/src/renderer/components/watch-video-info/watch-video-info.vue b/src/renderer/components/watch-video-info/watch-video-info.vue index 15af04c8..4086286f 100644 --- a/src/renderer/components/watch-video-info/watch-video-info.vue +++ b/src/renderer/components/watch-video-info/watch-video-info.vue @@ -39,7 +39,7 @@