diff options
Diffstat (limited to 'client/src/app/+admin/overview/videos/video-list.component.ts')
-rw-r--r-- | client/src/app/+admin/overview/videos/video-list.component.ts | 9 |
1 files changed, 9 insertions, 0 deletions
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' | |||
8 | import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' | 8 | import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' |
9 | import { VideoBlockComponent, VideoBlockService } from '@app/shared/shared-moderation' | 9 | import { VideoBlockComponent, VideoBlockService } from '@app/shared/shared-moderation' |
10 | import { VideoActionsDisplayType } from '@app/shared/shared-video-miniature' | 10 | import { VideoActionsDisplayType } from '@app/shared/shared-video-miniature' |
11 | import { getAllFiles } from '@shared/core-utils' | ||
11 | import { UserRight, VideoFile, VideoPrivacy, VideoState, VideoStreamingPlaylistType } from '@shared/models' | 12 | import { UserRight, VideoFile, VideoPrivacy, VideoState, VideoStreamingPlaylistType } from '@shared/models' |
12 | import { VideoAdminService } from './video-admin.service' | 13 | import { VideoAdminService } from './video-admin.service' |
13 | 14 | ||
@@ -166,6 +167,14 @@ export class VideoListComponent extends RestTable implements OnInit { | |||
166 | return video.files.length !== 0 | 167 | return video.files.length !== 0 |
167 | } | 168 | } |
168 | 169 | ||
170 | hasObjectStorage (video: Video) { | ||
171 | if (!video.isLocal) return false | ||
172 | |||
173 | const files = getAllFiles(video) | ||
174 | |||
175 | return files.some(f => !f.fileUrl.startsWith(window.location.origin)) | ||
176 | } | ||
177 | |||
169 | canRemoveOneFile (video: Video) { | 178 | canRemoveOneFile (video: Video) { |
170 | return video.canRemoveOneFile(this.authUser) | 179 | return video.canRemoveOneFile(this.authUser) |
171 | } | 180 | } |