aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 6eeb6b312..c49df1d5e 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -33,9 +33,8 @@ import { getHLSDirectory, getHLSRedundancyDirectory } from '@server/lib/paths'
33import { VideoPathManager } from '@server/lib/video-path-manager' 33import { VideoPathManager } from '@server/lib/video-path-manager'
34import { getServerActor } from '@server/models/application/application' 34import { getServerActor } from '@server/models/application/application'
35import { ModelCache } from '@server/models/model-cache' 35import { ModelCache } from '@server/models/model-cache'
36import { AttributesOnly, buildVideoEmbedPath, buildVideoWatchPath, pick } from '@shared/core-utils' 36import { AttributesOnly, buildVideoEmbedPath, buildVideoWatchPath, isThisWeek, pick } from '@shared/core-utils'
37import { VideoInclude } from '@shared/models' 37import { VideoFile, VideoInclude } from '@shared/models'
38import { VideoFile } from '@shared/models/videos/video-file.model'
39import { ResultList, UserRight, VideoPrivacy, VideoState } from '../../../shared' 38import { ResultList, UserRight, VideoPrivacy, VideoState } from '../../../shared'
40import { VideoObject } from '../../../shared/models/activitypub/objects' 39import { VideoObject } from '../../../shared/models/activitypub/objects'
41import { Video, VideoDetails, VideoRateType, VideoStorage } from '../../../shared/models/videos' 40import { Video, VideoDetails, VideoRateType, VideoStorage } from '../../../shared/models/videos'
@@ -1673,7 +1672,7 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
1673 const file = this.getMaxQualityFile() 1672 const file = this.getMaxQualityFile()
1674 const videoOrPlaylist = file.getVideoOrStreamingPlaylist() 1673 const videoOrPlaylist = file.getVideoOrStreamingPlaylist()
1675 1674
1676 return VideoPathManager.Instance.makeAvailableVideoFile(videoOrPlaylist, file, originalFilePath => { 1675 return VideoPathManager.Instance.makeAvailableVideoFile(file.withVideoOrPlaylist(videoOrPlaylist), originalFilePath => {
1677 return getVideoFileResolution(originalFilePath) 1676 return getVideoFileResolution(originalFilePath)
1678 }) 1677 })
1679 } 1678 }
@@ -1742,7 +1741,7 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
1742 ) 1741 )
1743 1742
1744 if (streamingPlaylist.storage === VideoStorage.OBJECT_STORAGE) { 1743 if (streamingPlaylist.storage === VideoStorage.OBJECT_STORAGE) {
1745 await removeHLSObjectStorage(streamingPlaylist, this) 1744 await removeHLSObjectStorage(streamingPlaylist.withVideo(this))
1746 } 1745 }
1747 } 1746 }
1748 } 1747 }