MVideoPlaylistElement,
MVideoPlaylistElementAP,
MVideoPlaylistElementFormattable,
+ MVideoPlaylistElementVideoUrlPlaylistPrivacy,
MVideoPlaylistVideoThumbnail
} from '@server/typings/models/video/video-playlist-element'
import { MUserAccountId } from '@server/typings/models'
return VideoPlaylistElementModel.findOne(query)
}
- static loadById (playlistElementId: number): Bluebird<MVideoPlaylistElement> {
+ static loadById (playlistElementId: number | string): Bluebird<MVideoPlaylistElement> {
return VideoPlaylistElementModel.findByPk(playlistElementId)
}
- static loadByPlaylistAndVideoForAP (playlistId: number | string, videoId: number | string): Bluebird<MVideoPlaylistElementAP> {
+ static loadByPlaylistAndVideoForAP (
+ playlistId: number | string,
+ videoId: number | string
+ ): Bluebird<MVideoPlaylistElementVideoUrlPlaylistPrivacy> {
const playlistWhere = validator.isUUID('' + playlistId) ? { uuid: playlistId } : { id: playlistId }
const videoWhere = validator.isUUID('' + videoId) ? { uuid: videoId } : { id: videoId }
}
}
- toActivityPubObject (): PlaylistElementObject {
+ toActivityPubObject (this: MVideoPlaylistElementAP): PlaylistElementObject {
const base: PlaylistElementObject = {
id: this.url,
type: 'PlaylistElement',