]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-live.ts
Prevent object storage mock conflicts
[github/Chocobozzz/PeerTube.git] / server / models / video / video-live.ts
index 290e1dda73ab17faaf3e71ab7a718b6a44f80aca..ca11186410158ef0fdd6a262f3dae893476252ed 100644 (file)
@@ -1,6 +1,7 @@
+import { Transaction } from 'sequelize'
 import {
-  BeforeDestroy,
   AllowNull,
+  BeforeDestroy,
   BelongsTo,
   Column,
   CreatedAt,
@@ -100,11 +101,12 @@ export class VideoLiveModel extends Model<Partial<AttributesOnly<VideoLiveModel>
   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<Partial<AttributesOnly<VideoLiveModel>
         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
       }
     }