X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-streaming-playlist.ts;h=a85c79c9f1d96c64c2542926aa964954bcfba0b8;hb=2a4c0d8bbe29178ae90e776bb9453f86e6d23bd9;hp=2b6771f27be89a5451bbac0b962a8c13926e71e7;hpb=91a4893063402d7beabb3104f9b989b8f88b6038;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-streaming-playlist.ts b/server/models/video/video-streaming-playlist.ts index 2b6771f27..a85c79c9f 100644 --- a/server/models/video/video-streaming-playlist.ts +++ b/server/models/video/video-streaming-playlist.ts @@ -15,8 +15,10 @@ import { Table, UpdatedAt } from 'sequelize-typescript' -import { getHLSPublicFileUrl } from '@server/lib/object-storage' +import { CONFIG } from '@server/initializers/config' +import { getHLSPrivateFileUrl, getHLSPublicFileUrl } from '@server/lib/object-storage' import { generateHLSMasterPlaylistFilename, generateHlsSha256SegmentsFilename } from '@server/lib/paths' +import { isVideoInPrivateDirectory } from '@server/lib/video-privacy' import { VideoFileModel } from '@server/models/video/video-file' import { MStreamingPlaylist, MStreamingPlaylistFilesVideo, MVideo } from '@server/types/models' import { sha1 } from '@shared/extra-utils' @@ -35,8 +37,7 @@ import { WEBSERVER } from '../../initializers/constants' import { VideoRedundancyModel } from '../redundancy/video-redundancy' -import { doesExist } from '../shared' -import { throwIfNotValid } from '../utils' +import { doesExist, throwIfNotValid } from '../shared' import { VideoModel } from './video' @Table({ @@ -136,7 +137,7 @@ export class VideoStreamingPlaylistModel extends Model