function doesVideoExist (keepOnlyOwned: boolean) {
return async (file: string) => {
const uuid = getUUIDFromFilename(file)
- const video = await VideoModel.loadByUUID(uuid)
+ const video = await VideoModel.load(uuid)
return video && (keepOnlyOwned === false || video.isOwned())
}