aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-11-21 12:16:27 +0100
committerChocobozzz <me@florianbigard.com>2019-11-25 10:59:44 +0100
commit66fb2aa39b6f8e4677f80128c27fbafd3a8fe2e7 (patch)
tree9d2f21e81cc42d8d51ac7ae35d91c30f143f0be0 /server/models/video/video.ts
parentd7a25329f9e607894d29ab342b9cb66638b56dc0 (diff)
downloadPeerTube-66fb2aa39b6f8e4677f80128c27fbafd3a8fe2e7.tar.gz
PeerTube-66fb2aa39b6f8e4677f80128c27fbafd3a8fe2e7.tar.zst
PeerTube-66fb2aa39b6f8e4677f80128c27fbafd3a8fe2e7.zip
Don't always replace actor avatar
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 f84a90992..7e3512fe1 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -143,7 +143,7 @@ import {
143import { MVideoFile, MVideoFileStreamingPlaylistVideo } from '../../typings/models/video/video-file' 143import { MVideoFile, MVideoFileStreamingPlaylistVideo } from '../../typings/models/video/video-file'
144import { MThumbnail } from '../../typings/models/video/thumbnail' 144import { MThumbnail } from '../../typings/models/video/thumbnail'
145import { VideoFile } from '@shared/models/videos/video-file.model' 145import { VideoFile } from '@shared/models/videos/video-file.model'
146import { getTorrentFileName, getTorrentFilePath, getVideoFilename, getVideoFilePath } from '@server/lib/video-paths' 146import { getTorrentFileName, getTorrentFilePath, getVideoFilename, getVideoFilePath, getHLSDirectory } from '@server/lib/video-paths'
147 147
148// FIXME: Define indexes here because there is an issue with TS and Sequelize.literal when called directly in the annotation 148// FIXME: Define indexes here because there is an issue with TS and Sequelize.literal when called directly in the annotation
149const indexes: (ModelIndexesOptions & { where?: WhereOptions })[] = [ 149const indexes: (ModelIndexesOptions & { where?: WhereOptions })[] = [
@@ -1950,11 +1950,10 @@ export class VideoModel extends Model<VideoModel> {
1950 } 1950 }
1951 1951
1952 removeStreamingPlaylist (isRedundancy = false) { 1952 removeStreamingPlaylist (isRedundancy = false) {
1953 const baseDir = isRedundancy ? HLS_REDUNDANCY_DIRECTORY : HLS_STREAMING_PLAYLIST_DIRECTORY 1953 const directoryPath = getHLSDirectory(this, isRedundancy)
1954 1954
1955 const filePath = join(baseDir, this.uuid) 1955 return remove(directoryPath)
1956 return remove(filePath) 1956 .catch(err => logger.warn('Cannot delete playlist directory %s.', directoryPath, { err }))
1957 .catch(err => logger.warn('Cannot delete playlist directory %s.', filePath, { err }))
1958 } 1957 }
1959 1958
1960 isOutdated () { 1959 isOutdated () {