Add ability to filter live videos
This commit is contained in:
parent
9814ea9f04
commit
d5d9c5b79e
|
@ -40,6 +40,20 @@ export class VideoAdminService {
|
||||||
|
|
||||||
buildAdminInputFilter (): AdvancedInputFilter[] {
|
buildAdminInputFilter (): AdvancedInputFilter[] {
|
||||||
return [
|
return [
|
||||||
|
{
|
||||||
|
title: $localize`Video type`,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
queryParams: { search: 'isLive:false' },
|
||||||
|
label: $localize`VOD videos`
|
||||||
|
},
|
||||||
|
{
|
||||||
|
queryParams: { search: 'isLive:true' },
|
||||||
|
label: $localize`Live videos`
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: $localize`Videos scope`,
|
title: $localize`Videos scope`,
|
||||||
children: [
|
children: [
|
||||||
|
@ -80,6 +94,10 @@ export class VideoAdminService {
|
||||||
prefix: 'isLocal:',
|
prefix: 'isLocal:',
|
||||||
isBoolean: true
|
isBoolean: true
|
||||||
},
|
},
|
||||||
|
isLive: {
|
||||||
|
prefix: 'isLive:',
|
||||||
|
isBoolean: true
|
||||||
|
},
|
||||||
excludeMuted: {
|
excludeMuted: {
|
||||||
prefix: 'excludeMuted',
|
prefix: 'excludeMuted',
|
||||||
handler: () => true
|
handler: () => true
|
||||||
|
|
|
@ -108,7 +108,10 @@ export class VideoListComponent extends RestTable implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
isHLS (video: Video) {
|
isHLS (video: Video) {
|
||||||
return video.streamingPlaylists.some(p => p.type === VideoStreamingPlaylistType.HLS)
|
const p = video.streamingPlaylists.find(p => p.type === VideoStreamingPlaylistType.HLS)
|
||||||
|
if (!p) return false
|
||||||
|
|
||||||
|
return p.files.length !== 0
|
||||||
}
|
}
|
||||||
|
|
||||||
isWebTorrent (video: Video) {
|
isWebTorrent (video: Video) {
|
||||||
|
|
Loading…
Reference in New Issue