aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-11-03 09:59:53 +0100
committerChocobozzz <me@florianbigard.com>2021-11-03 09:59:53 +0100
commitd5d9c5b79edf613e97a752a3d59062fb42045275 (patch)
tree7722da4b54160084b1e9c2e06f7c836c5e241fef
parent9814ea9f040e42b64c088584934950c2314e933e (diff)
downloadPeerTube-d5d9c5b79edf613e97a752a3d59062fb42045275.tar.gz
PeerTube-d5d9c5b79edf613e97a752a3d59062fb42045275.tar.zst
PeerTube-d5d9c5b79edf613e97a752a3d59062fb42045275.zip
Add ability to filter live videos
-rw-r--r--client/src/app/+admin/overview/videos/video-admin.service.ts18
-rw-r--r--client/src/app/+admin/overview/videos/video-list.component.ts5
2 files changed, 22 insertions, 1 deletions
diff --git a/client/src/app/+admin/overview/videos/video-admin.service.ts b/client/src/app/+admin/overview/videos/video-admin.service.ts
index 696609cb2..d0854a2dc 100644
--- a/client/src/app/+admin/overview/videos/video-admin.service.ts
+++ b/client/src/app/+admin/overview/videos/video-admin.service.ts
@@ -41,6 +41,20 @@ export class VideoAdminService {
41 buildAdminInputFilter (): AdvancedInputFilter[] { 41 buildAdminInputFilter (): AdvancedInputFilter[] {
42 return [ 42 return [
43 { 43 {
44 title: $localize`Video type`,
45 children: [
46 {
47 queryParams: { search: 'isLive:false' },
48 label: $localize`VOD videos`
49 },
50 {
51 queryParams: { search: 'isLive:true' },
52 label: $localize`Live videos`
53 }
54 ]
55 },
56
57 {
44 title: $localize`Videos scope`, 58 title: $localize`Videos scope`,
45 children: [ 59 children: [
46 { 60 {
@@ -80,6 +94,10 @@ export class VideoAdminService {
80 prefix: 'isLocal:', 94 prefix: 'isLocal:',
81 isBoolean: true 95 isBoolean: true
82 }, 96 },
97 isLive: {
98 prefix: 'isLive:',
99 isBoolean: true
100 },
83 excludeMuted: { 101 excludeMuted: {
84 prefix: 'excludeMuted', 102 prefix: 'excludeMuted',
85 handler: () => true 103 handler: () => true
diff --git a/client/src/app/+admin/overview/videos/video-list.component.ts b/client/src/app/+admin/overview/videos/video-list.component.ts
index b0e476569..8a15e8426 100644
--- a/client/src/app/+admin/overview/videos/video-list.component.ts
+++ b/client/src/app/+admin/overview/videos/video-list.component.ts
@@ -108,7 +108,10 @@ export class VideoListComponent extends RestTable implements OnInit {
108 } 108 }
109 109
110 isHLS (video: Video) { 110 isHLS (video: Video) {
111 return video.streamingPlaylists.some(p => p.type === VideoStreamingPlaylistType.HLS) 111 const p = video.streamingPlaylists.find(p => p.type === VideoStreamingPlaylistType.HLS)
112 if (!p) return false
113
114 return p.files.length !== 0
112 } 115 }
113 116
114 isWebTorrent (video: Video) { 117 isWebTorrent (video: Video) {