}
static loadAndPopulateVideo (id: number) {
- return VideoImportModel.findById(id)
+ return VideoImportModel.findByPk(id)
}
static listUserVideoImportsForApi (userId: number, start: number, count: number, sort: string) {
})
}
+ getTargetIdentifier () {
+ return this.targetUrl || this.magnetUri || this.torrentName
+ }
+
toFormattedJSON (): VideoImport {
const videoFormatOptions = {
+ completeDescription: true,
additionalAttributes: { state: true, waitTranscoding: true, scheduledUpdate: true }
}
const video = this.Video
- ? Object.assign(this.Video.toFormattedJSON(videoFormatOptions), {
- tags: this.Video.Tags.map(t => t.name)
- })
+ ? Object.assign(this.Video.toFormattedJSON(videoFormatOptions), { tags: this.Video.Tags.map(t => t.name) })
: undefined
return {