diff options
Diffstat (limited to 'server/models/video/video-playlist-element.ts')
-rw-r--r-- | server/models/video/video-playlist-element.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/models/video/video-playlist-element.ts b/server/models/video/video-playlist-element.ts index 80ca22a18..a28021313 100644 --- a/server/models/video/video-playlist-element.ts +++ b/server/models/video/video-playlist-element.ts | |||
@@ -29,6 +29,7 @@ import { | |||
29 | MVideoPlaylistElement, | 29 | MVideoPlaylistElement, |
30 | MVideoPlaylistElementAP, | 30 | MVideoPlaylistElementAP, |
31 | MVideoPlaylistElementFormattable, | 31 | MVideoPlaylistElementFormattable, |
32 | MVideoPlaylistElementVideoUrlPlaylistPrivacy, | ||
32 | MVideoPlaylistVideoThumbnail | 33 | MVideoPlaylistVideoThumbnail |
33 | } from '@server/typings/models/video/video-playlist-element' | 34 | } from '@server/typings/models/video/video-playlist-element' |
34 | import { MUserAccountId } from '@server/typings/models' | 35 | import { MUserAccountId } from '@server/typings/models' |
@@ -184,7 +185,10 @@ export class VideoPlaylistElementModel extends Model<VideoPlaylistElementModel> | |||
184 | return VideoPlaylistElementModel.findByPk(playlistElementId) | 185 | return VideoPlaylistElementModel.findByPk(playlistElementId) |
185 | } | 186 | } |
186 | 187 | ||
187 | static loadByPlaylistAndVideoForAP (playlistId: number | string, videoId: number | string): Bluebird<MVideoPlaylistElementAP> { | 188 | static loadByPlaylistAndVideoForAP ( |
189 | playlistId: number | string, | ||
190 | videoId: number | string | ||
191 | ): Bluebird<MVideoPlaylistElementVideoUrlPlaylistPrivacy> { | ||
188 | const playlistWhere = validator.isUUID('' + playlistId) ? { uuid: playlistId } : { id: playlistId } | 192 | const playlistWhere = validator.isUUID('' + playlistId) ? { uuid: playlistId } : { id: playlistId } |
189 | const videoWhere = validator.isUUID('' + videoId) ? { uuid: videoId } : { id: videoId } | 193 | const videoWhere = validator.isUUID('' + videoId) ? { uuid: videoId } : { id: videoId } |
190 | 194 | ||
@@ -336,7 +340,7 @@ export class VideoPlaylistElementModel extends Model<VideoPlaylistElementModel> | |||
336 | } | 340 | } |
337 | } | 341 | } |
338 | 342 | ||
339 | toActivityPubObject (): PlaylistElementObject { | 343 | toActivityPubObject (this: MVideoPlaylistElementAP): PlaylistElementObject { |
340 | const base: PlaylistElementObject = { | 344 | const base: PlaylistElementObject = { |
341 | id: this.url, | 345 | id: this.url, |
342 | type: 'PlaylistElement', | 346 | type: 'PlaylistElement', |