X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fvideo%2Fvideo-details.model.ts;h=14347a109da8478747c0127e5c18262a616795ff;hb=e612209767ebe1deb0af7688c96b7f979bb52b44;hp=22f024656175f49be46fef97a2573e589bb16489;hpb=97567dd81f508dd6295ac4d73d849aa2ce0a6549;p=oweals%2Fpeertube.git diff --git a/client/src/app/shared/video/video-details.model.ts b/client/src/app/shared/video/video-details.model.ts index 22f024656..14347a109 100644 --- a/client/src/app/shared/video/video-details.model.ts +++ b/client/src/app/shared/video/video-details.model.ts @@ -1,5 +1,4 @@ -import { UserRight, VideoConstant, VideoDetails as VideoDetailsServerModel, VideoFile, VideoState } from '../../../../../shared' -import { AuthUser } from '../../core' +import { VideoConstant, VideoDetails as VideoDetailsServerModel, VideoFile, VideoState } from '../../../../../shared' import { Video } from '../../shared/video/video.model' import { Account } from '@app/shared/account/account.model' import { VideoChannel } from '@app/shared/video-channel/video-channel.model' @@ -56,4 +55,10 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { hasHlsPlaylist () { return !!this.getHlsPlaylist() } + + getFiles () { + if (this.files.length === 0) return this.getHlsPlaylist().files + + return this.files + } }