diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-18 14:35:08 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-18 15:20:57 +0100 |
commit | ad5db1044c8599eaaaa2a578b350777ae996b068 (patch) | |
tree | 3e003cccf021152405d49b21c6c91b703c8ae96c /server/models/video/video.ts | |
parent | b46cf4b920984492df598c1b61179acfc7f6f22e (diff) | |
download | PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.tar.gz PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.tar.zst PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.zip |
Add ability to run transcoding jobs
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r-- | server/models/video/video.ts | 9 |
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' | |||
33 | import { VideoPathManager } from '@server/lib/video-path-manager' | 33 | import { VideoPathManager } from '@server/lib/video-path-manager' |
34 | import { getServerActor } from '@server/models/application/application' | 34 | import { getServerActor } from '@server/models/application/application' |
35 | import { ModelCache } from '@server/models/model-cache' | 35 | import { ModelCache } from '@server/models/model-cache' |
36 | import { AttributesOnly, buildVideoEmbedPath, buildVideoWatchPath, pick } from '@shared/core-utils' | 36 | import { AttributesOnly, buildVideoEmbedPath, buildVideoWatchPath, isThisWeek, pick } from '@shared/core-utils' |
37 | import { VideoInclude } from '@shared/models' | 37 | import { VideoFile, VideoInclude } from '@shared/models' |
38 | import { VideoFile } from '@shared/models/videos/video-file.model' | ||
39 | import { ResultList, UserRight, VideoPrivacy, VideoState } from '../../../shared' | 38 | import { ResultList, UserRight, VideoPrivacy, VideoState } from '../../../shared' |
40 | import { VideoObject } from '../../../shared/models/activitypub/objects' | 39 | import { VideoObject } from '../../../shared/models/activitypub/objects' |
41 | import { Video, VideoDetails, VideoRateType, VideoStorage } from '../../../shared/models/videos' | 40 | import { 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 | } |