Add ability to filter live videos

This commit is contained in:
Chocobozzz 2021-11-03 09:59:53 +01:00
parent 9814ea9f04
commit d5d9c5b79e
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 22 additions and 1 deletions

View File

@ -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

View File

@ -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) {