diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-04 17:08:55 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-12-04 17:08:55 +0100 |
commit | b9fffa297f49a84df8ffd0d7b842599bc88a8e3e (patch) | |
tree | 49a12ebebf4d533e8b273abbb9492350a233101d /server/models/redundancy/video-redundancy.ts | |
parent | 6040f87d143a5fa01db79867ece8197c3ce7be47 (diff) | |
download | PeerTube-b9fffa297f49a84df8ffd0d7b842599bc88a8e3e.tar.gz PeerTube-b9fffa297f49a84df8ffd0d7b842599bc88a8e3e.tar.zst PeerTube-b9fffa297f49a84df8ffd0d7b842599bc88a8e3e.zip |
Create redundancy endpoint
Diffstat (limited to 'server/models/redundancy/video-redundancy.ts')
-rw-r--r-- | server/models/redundancy/video-redundancy.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts index 9de4356b4..dd37dad22 100644 --- a/server/models/redundancy/video-redundancy.ts +++ b/server/models/redundancy/video-redundancy.ts | |||
@@ -15,7 +15,7 @@ import { | |||
15 | import { ActorModel } from '../activitypub/actor' | 15 | import { ActorModel } from '../activitypub/actor' |
16 | import { getVideoSort, throwIfNotValid } from '../utils' | 16 | import { getVideoSort, throwIfNotValid } from '../utils' |
17 | import { isActivityPubUrlValid, isUrlValid } from '../../helpers/custom-validators/activitypub/misc' | 17 | import { isActivityPubUrlValid, isUrlValid } from '../../helpers/custom-validators/activitypub/misc' |
18 | import { CONFIG, CONSTRAINTS_FIELDS, VIDEO_EXT_MIMETYPE } from '../../initializers' | 18 | import { CONFIG, CONSTRAINTS_FIELDS, STATIC_PATHS, VIDEO_EXT_MIMETYPE } from '../../initializers' |
19 | import { VideoFileModel } from '../video/video-file' | 19 | import { VideoFileModel } from '../video/video-file' |
20 | import { getServerActor } from '../../helpers/utils' | 20 | import { getServerActor } from '../../helpers/utils' |
21 | import { VideoModel } from '../video/video' | 21 | import { VideoModel } from '../video/video' |
@@ -124,7 +124,7 @@ export class VideoRedundancyModel extends Model<VideoRedundancyModel> { | |||
124 | const logIdentifier = `${videoFile.Video.uuid}-${videoFile.resolution}` | 124 | const logIdentifier = `${videoFile.Video.uuid}-${videoFile.resolution}` |
125 | logger.info('Removing duplicated video file %s.', logIdentifier) | 125 | logger.info('Removing duplicated video file %s.', logIdentifier) |
126 | 126 | ||
127 | videoFile.Video.removeFile(videoFile) | 127 | videoFile.Video.removeFile(videoFile, true) |
128 | .catch(err => logger.error('Cannot delete %s files.', logIdentifier, { err })) | 128 | .catch(err => logger.error('Cannot delete %s files.', logIdentifier, { err })) |
129 | 129 | ||
130 | return undefined | 130 | return undefined |