X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-live.ts;h=ca11186410158ef0fdd6a262f3dae893476252ed;hb=f89189907bbdff6c4bc6d3460ed9ef4c49515f17;hp=290e1dda73ab17faaf3e71ab7a718b6a44f80aca;hpb=05a60d85997c108d39bcfb14f1ffd4c74f8b1e93;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-live.ts b/server/models/video/video-live.ts index 290e1dda7..ca1118641 100644 --- a/server/models/video/video-live.ts +++ b/server/models/video/video-live.ts @@ -1,6 +1,7 @@ +import { Transaction } from 'sequelize' import { - BeforeDestroy, AllowNull, + BeforeDestroy, BelongsTo, Column, CreatedAt, @@ -100,11 +101,12 @@ export class VideoLiveModel extends Model ReplaySetting: VideoLiveReplaySettingModel @BeforeDestroy - static deleteReplaySetting (instance: VideoLiveModel) { + static deleteReplaySetting (instance: VideoLiveModel, options: { transaction: Transaction }) { return VideoLiveReplaySettingModel.destroy({ where: { id: instance.replaySettingId - } + }, + transaction: options.transaction }) } @@ -157,11 +159,11 @@ export class VideoLiveModel extends Model streamKey: this.streamKey, rtmpUrl: CONFIG.LIVE.RTMP.ENABLED - ? WEBSERVER.RTMP_URL + ? WEBSERVER.RTMP_BASE_LIVE_URL : null, rtmpsUrl: CONFIG.LIVE.RTMPS.ENABLED - ? WEBSERVER.RTMPS_URL + ? WEBSERVER.RTMPS_BASE_LIVE_URL : null } }