Display total videos of channels
This commit is contained in:
parent
f7eb829b5c
commit
b4a218b331
|
@ -25,6 +25,10 @@
|
||||||
<!-- eslint-enable -->
|
<!-- eslint-enable -->
|
||||||
|
|
||||||
<div class="metadata">
|
<div class="metadata">
|
||||||
|
<div>
|
||||||
|
<label>{{ $ngettext('%{videosCount} video', '%{videosCount} videos', channel.videosCount, { videosCount: channel.videosCount }) }}</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label>{{ $gettext('Channel created on platform') }}</label>
|
<label>{{ $gettext('Channel created on platform') }}</label>
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,12 @@ async function queryChannels (search: ChannelsSearchQuery) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mustNot.push({
|
||||||
|
term: {
|
||||||
|
videosCount: 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
if (search.host) {
|
if (search.host) {
|
||||||
filter.push({
|
filter.push({
|
||||||
term: {
|
term: {
|
||||||
|
@ -104,6 +110,8 @@ function formatChannelForAPI (c: DBChannel, fromHost?: string): EnhancedVideoCha
|
||||||
support: c.support,
|
support: c.support,
|
||||||
isLocal: fromHost === c.host,
|
isLocal: fromHost === c.host,
|
||||||
|
|
||||||
|
videosCount: c.videosCount || 0,
|
||||||
|
|
||||||
ownerAccount: {
|
ownerAccount: {
|
||||||
id: c.ownerAccount.id,
|
id: c.ownerAccount.id,
|
||||||
url: c.ownerAccount.url,
|
url: c.ownerAccount.url,
|
||||||
|
|
|
@ -28,5 +28,7 @@ export interface DBChannelSummary extends VideoChannelSummary {
|
||||||
|
|
||||||
// Results from the search API
|
// Results from the search API
|
||||||
export interface EnhancedVideoChannel extends VideoChannel {
|
export interface EnhancedVideoChannel extends VideoChannel {
|
||||||
|
videosCount: number
|
||||||
|
|
||||||
score: number
|
score: number
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue