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,
|
type: Function,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
isLive: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
isLiveContent: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
isUpcoming: {
|
isUpcoming: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: true
|
required: true
|
||||||
|
@ -177,6 +185,16 @@ export default Vue.extend({
|
||||||
const dateSplit = date.toDateString().split(' ')
|
const dateSplit = date.toDateString().split(' ')
|
||||||
const localeDateString = `Video.Published.${dateSplit[1]}`
|
const localeDateString = `Video.Published.${dateSplit[1]}`
|
||||||
return `${this.$t(localeDateString)} ${dateSplit[2]}, ${dateSplit[3]}`
|
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: {
|
methods: {
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="datePublished">
|
<div class="datePublished">
|
||||||
{{ $t("Video.Published on") }} {{ dateString }}
|
{{ publishedString }} {{ dateString }}
|
||||||
</div>
|
</div>
|
||||||
<div class="viewCount">
|
<div class="viewCount">
|
||||||
{{ parsedViewCount }}
|
{{ parsedViewCount }}
|
||||||
|
|
|
@ -44,6 +44,7 @@ export default Vue.extend({
|
||||||
showYouTubeNoCookieEmbed: false,
|
showYouTubeNoCookieEmbed: false,
|
||||||
hidePlayer: false,
|
hidePlayer: false,
|
||||||
isLive: false,
|
isLive: false,
|
||||||
|
isLiveContent: false,
|
||||||
isUpcoming: false,
|
isUpcoming: false,
|
||||||
upcomingTimestamp: null,
|
upcomingTimestamp: null,
|
||||||
activeFormat: 'legacy',
|
activeFormat: 'legacy',
|
||||||
|
@ -234,7 +235,8 @@ export default Vue.extend({
|
||||||
this.videoLikeCount = result.videoDetails.likes
|
this.videoLikeCount = result.videoDetails.likes
|
||||||
this.videoDislikeCount = result.videoDetails.dislikes
|
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
|
this.isUpcoming = result.player_response.videoDetails.isUpcoming ? result.player_response.videoDetails.isUpcoming : false
|
||||||
|
|
||||||
if (!this.isLive && !this.isUpcoming) {
|
if (!this.isLive && !this.isUpcoming) {
|
||||||
|
|
|
@ -74,6 +74,8 @@
|
||||||
:dislike-count="videoDislikeCount"
|
:dislike-count="videoDislikeCount"
|
||||||
:view-count="videoViewCount"
|
:view-count="videoViewCount"
|
||||||
:get-timestamp="getTimestamp"
|
:get-timestamp="getTimestamp"
|
||||||
|
:is-live-content="isLiveContent"
|
||||||
|
:is-live="isLive"
|
||||||
:is-upcoming="isUpcoming"
|
:is-upcoming="isUpcoming"
|
||||||
:download-links="downloadLinks"
|
:download-links="downloadLinks"
|
||||||
class="watchVideo"
|
class="watchVideo"
|
||||||
|
|
|
@ -463,6 +463,8 @@ Video:
|
||||||
Ago: Ago
|
Ago: Ago
|
||||||
Upcoming: Premieres on
|
Upcoming: Premieres on
|
||||||
Published on: Published 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...)
|
# $ is replaced with the number and % with the unit (days, hours, minutes...)
|
||||||
Publicationtemplate: $ % ago
|
Publicationtemplate: $ % ago
|
||||||
#& Videos
|
#& Videos
|
||||||
|
|
Loading…
Reference in New Issue