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.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 7e008f7ea..8e71f8c32 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -25,7 +25,7 @@ import {
25 UpdatedAt 25 UpdatedAt
26} from 'sequelize-typescript' 26} from 'sequelize-typescript'
27import { buildNSFWFilter } from '@server/helpers/express-utils' 27import { buildNSFWFilter } from '@server/helpers/express-utils'
28import { getPrivaciesForFederation, isPrivacyForFederation } from '@server/helpers/video' 28import { getPrivaciesForFederation, isPrivacyForFederation, isStateForFederation } from '@server/helpers/video'
29import { LiveManager } from '@server/lib/live-manager' 29import { LiveManager } from '@server/lib/live-manager'
30import { getHLSDirectory, getTorrentFileName, getTorrentFilePath, getVideoFilename, getVideoFilePath } from '@server/lib/video-paths' 30import { getHLSDirectory, getTorrentFileName, getTorrentFilePath, getVideoFilename, getVideoFilePath } from '@server/lib/video-paths'
31import { getServerActor } from '@server/models/application/application' 31import { getServerActor } from '@server/models/application/application'
@@ -823,6 +823,8 @@ export class VideoModel extends Model<VideoModel> {
823 static stopLiveIfNeeded (instance: VideoModel) { 823 static stopLiveIfNeeded (instance: VideoModel) {
824 if (!instance.isLive) return 824 if (!instance.isLive) return
825 825
826 logger.info('Stopping live of video %s after video deletion.', instance.uuid)
827
826 return LiveManager.Instance.stopSessionOf(instance.id) 828 return LiveManager.Instance.stopSessionOf(instance.id)
827 } 829 }
828 830
@@ -1921,6 +1923,10 @@ export class VideoModel extends Model<VideoModel> {
1921 return isPrivacyForFederation(this.privacy) 1923 return isPrivacyForFederation(this.privacy)
1922 } 1924 }
1923 1925
1926 hasStateForFederation () {
1927 return isStateForFederation(this.state)
1928 }
1929
1924 isNewVideo (newPrivacy: VideoPrivacy) { 1930 isNewVideo (newPrivacy: VideoPrivacy) {
1925 return this.hasPrivacyForFederation() === false && isPrivacyForFederation(newPrivacy) === true 1931 return this.hasPrivacyForFederation() === false && isPrivacyForFederation(newPrivacy) === true
1926 } 1932 }