diff options
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/video-playlist.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/controllers/api/video-playlist.ts b/server/controllers/api/video-playlist.ts index 88a2314fb..41a0e07ff 100644 --- a/server/controllers/api/video-playlist.ts +++ b/server/controllers/api/video-playlist.ts | |||
@@ -297,7 +297,6 @@ async function addVideoInPlaylist (req: express.Request, res: express.Response) | |||
297 | const position = await VideoPlaylistElementModel.getNextPositionOf(videoPlaylist.id, t) | 297 | const position = await VideoPlaylistElementModel.getNextPositionOf(videoPlaylist.id, t) |
298 | 298 | ||
299 | const playlistElement = await VideoPlaylistElementModel.create({ | 299 | const playlistElement = await VideoPlaylistElementModel.create({ |
300 | url: getVideoPlaylistElementActivityPubUrl(videoPlaylist, video), | ||
301 | position, | 300 | position, |
302 | startTimestamp: body.startTimestamp || null, | 301 | startTimestamp: body.startTimestamp || null, |
303 | stopTimestamp: body.stopTimestamp || null, | 302 | stopTimestamp: body.stopTimestamp || null, |
@@ -305,6 +304,9 @@ async function addVideoInPlaylist (req: express.Request, res: express.Response) | |||
305 | videoId: video.id | 304 | videoId: video.id |
306 | }, { transaction: t }) | 305 | }, { transaction: t }) |
307 | 306 | ||
307 | playlistElement.url = getVideoPlaylistElementActivityPubUrl(videoPlaylist, playlistElement) | ||
308 | await playlistElement.save({ transaction: t }) | ||
309 | |||
308 | videoPlaylist.changed('updatedAt', true) | 310 | videoPlaylist.changed('updatedAt', true) |
309 | await videoPlaylist.save({ transaction: t }) | 311 | await videoPlaylist.save({ transaction: t }) |
310 | 312 | ||