Optimize SQL requests of watch page API endpoints
This commit is contained in:
parent
e972e046db
commit
627621c1e8
15 changed files with 68 additions and 60 deletions
|
@ -56,7 +56,7 @@ async function pruneDirectory (directory: string) {
|
|||
const uuid = getUUIDFromFilename(file)
|
||||
let video: VideoModel
|
||||
|
||||
if (uuid) video = await VideoModel.loadByUUID(uuid)
|
||||
if (uuid) video = await VideoModel.loadByUUIDWithFile(uuid)
|
||||
|
||||
if (!uuid || !video) toDelete.push(join(directory, file))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue