<td>
<span *ngIf="isHLS(video)" class="pt-badge badge-blue">HLS</span>
<span *ngIf="isWebTorrent(video)" class="pt-badge badge-blue">WebTorrent ({{ video.files.length }})</span>
- <span *ngIf="video.isLive" class="pt-badge badge-blue">Live</span>
+ <span i18n *ngIf="video.isLive" class="pt-badge badge-blue">Live</span>
+ <span i18n *ngIf="hasObjectStorage(video)" class="pt-badge badge-purple">Object storage</span>
<span *ngIf="!isImport(video) && !video.isLive && video.isLocal">{{ getFilesSize(video) | bytes: 1 }}</span>
</td>
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'
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)
}