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
This commit is contained in:
parent
e7ce45b524
commit
3c8dfb84b5
|
@ -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: {
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</div>
|
||||
<div>
|
||||
<div class="datePublished">
|
||||
{{ $t("Video.Published on") }} {{ dateString }}
|
||||
{{ publishedString }} {{ dateString }}
|
||||
</div>
|
||||
<div class="viewCount">
|
||||
{{ parsedViewCount }}
|
||||
|
|
|
@ -44,6 +44,7 @@ export default Vue.extend({
|
|||
showYouTubeNoCookieEmbed: false,
|
||||
hidePlayer: false,
|
||||
isLive: false,
|
||||
isLiveContent: false,
|
||||
isUpcoming: false,
|
||||
upcomingTimestamp: null,
|
||||
activeFormat: 'legacy',
|
||||
|
@ -234,7 +235,8 @@ export default Vue.extend({
|
|||
this.videoLikeCount = result.videoDetails.likes
|
||||
this.videoDislikeCount = result.videoDetails.dislikes
|
||||
}
|
||||
this.isLive = result.player_response.videoDetails.isLiveContent || result.player_response.videoDetails.isLive
|
||||
this.isLive = result.player_response.videoDetails.isLive
|
||||
this.isLiveContent = result.player_response.videoDetails.isLiveContent
|
||||
this.isUpcoming = result.player_response.videoDetails.isUpcoming ? result.player_response.videoDetails.isUpcoming : false
|
||||
|
||||
if (!this.isLive && !this.isUpcoming) {
|
||||
|
|
|
@ -74,6 +74,8 @@
|
|||
:dislike-count="videoDislikeCount"
|
||||
:view-count="videoViewCount"
|
||||
:get-timestamp="getTimestamp"
|
||||
:is-live-content="isLiveContent"
|
||||
:is-live="isLive"
|
||||
:is-upcoming="isUpcoming"
|
||||
:download-links="downloadLinks"
|
||||
class="watchVideo"
|
||||
|
|
|
@ -463,6 +463,8 @@ Video:
|
|||
Ago: Ago
|
||||
Upcoming: Premieres on
|
||||
Published on: Published on
|
||||
Streamed on: Streamed on
|
||||
Started streaming on: Started streaming on
|
||||
# $ is replaced with the number and % with the unit (days, hours, minutes...)
|
||||
Publicationtemplate: $ % ago
|
||||
#& Videos
|
||||
|
|
Loading…
Reference in New Issue