diff --git a/client/src/app/+admin/overview/videos/video-list.component.html b/client/src/app/+admin/overview/videos/video-list.component.html index 14bbb55e9..fb5e533f1 100644 --- a/client/src/app/+admin/overview/videos/video-list.component.html +++ b/client/src/app/+admin/overview/videos/video-list.component.html @@ -85,7 +85,8 @@ HLS WebTorrent ({{ video.files.length }}) - Live + Live + Object storage {{ getFilesSize(video) | bytes: 1 }} 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 cb693ce12..4d3e9873c 100644 --- a/client/src/app/+admin/overview/videos/video-list.component.ts +++ b/client/src/app/+admin/overview/videos/video-list.component.ts @@ -8,6 +8,7 @@ import { AdvancedInputFilter } from '@app/shared/shared-forms' import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' import { VideoBlockComponent, VideoBlockService } from '@app/shared/shared-moderation' import { VideoActionsDisplayType } from '@app/shared/shared-video-miniature' +import { getAllFiles } from '@shared/core-utils' import { UserRight, VideoFile, VideoPrivacy, VideoState, VideoStreamingPlaylistType } from '@shared/models' import { VideoAdminService } from './video-admin.service' @@ -166,6 +167,14 @@ export class VideoListComponent extends RestTable implements OnInit { return video.files.length !== 0 } + hasObjectStorage (video: Video) { + if (!video.isLocal) return false + + const files = getAllFiles(video) + + return files.some(f => !f.fileUrl.startsWith(window.location.origin)) + } + canRemoveOneFile (video: Video) { return video.canRemoveOneFile(this.authUser) }