Add ability to filter live videos
This commit is contained in:
parent
9814ea9f04
commit
d5d9c5b79e
|
@ -40,6 +40,20 @@ export class VideoAdminService {
|
|||
|
||||
buildAdminInputFilter (): AdvancedInputFilter[] {
|
||||
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`,
|
||||
children: [
|
||||
|
@ -80,6 +94,10 @@ export class VideoAdminService {
|
|||
prefix: 'isLocal:',
|
||||
isBoolean: true
|
||||
},
|
||||
isLive: {
|
||||
prefix: 'isLive:',
|
||||
isBoolean: true
|
||||
},
|
||||
excludeMuted: {
|
||||
prefix: 'excludeMuted',
|
||||
handler: () => true
|
||||
|
|
|
@ -108,7 +108,10 @@ export class VideoListComponent extends RestTable implements OnInit {
|
|||
}
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue