More robust doesVideoExistForVideoFile
This commit is contained in:
parent
601bf7ad96
commit
71857cc04b
1 changed files with 2 additions and 0 deletions
|
@ -352,6 +352,8 @@ export class VideoFileModel extends SequelizeModel<VideoFileModel> {
|
|||
return VideoFileModel.scope({ method: [ ScopeNames.WITH_VIDEO_OR_PLAYLIST, whereVideo ] })
|
||||
.findOne(options)
|
||||
.then(file => {
|
||||
if (!file) return null
|
||||
|
||||
// We used `required: false` so check we have at least a video or a streaming playlist
|
||||
if (!file.Video && !file.VideoStreamingPlaylist) return null
|
||||
|
||||
|
|
Loading…
Reference in a new issue