-import { VideoLiveModel } from '@server/models/video/video-live'
import * as Bluebird from 'bluebird'
import { maxBy, minBy } from 'lodash'
import * as magnetUtil from 'magnet-uri'
import { join } from 'path'
import * as request from 'request'
import * as sequelize from 'sequelize'
+import { VideoLiveModel } from '@server/models/video/video-live'
import {
ActivityHashTagObject,
ActivityMagnetUrlObject,
ActivitypubHttpFetcherPayload,
ActivityTagObject,
ActivityUrlObject,
- ActivityVideoUrlObject,
- VideoState
+ ActivityVideoUrlObject
} from '../../../shared/index'
import { VideoObject } from '../../../shared/models/activitypub/objects'
import { VideoPrivacy } from '../../../shared/models/videos'
if (video.isLive) {
const [ videoLive ] = await VideoLiveModel.upsert({
saveReplay: videoObject.liveSaveReplay,
+ permanentLive: videoObject.permanentLive,
videoId: video.id
}, { transaction: t, returning: true })
return url && url.type === 'Hashtag'
}
-
-
async function createVideo (videoObject: VideoObject, channel: MChannelAccountLight, waitThumbnail = false) {
logger.debug('Adding remote video %s.', videoObject.id)
const videoLive = new VideoLiveModel({
streamKey: null,
saveReplay: videoObject.liveSaveReplay,
+ permanentLive: videoObject.permanentLive,
videoId: videoCreated.id
})