Keep Studio 2 family tiles tied to existing library files
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { existsSync } from 'node:fs';
|
||||
import { publicLibrary, stillPath, clipVideoPath } from '../../utils/library';
|
||||
export default defineEventHandler(event => {
|
||||
const { owner } = assertLibraryOwner(event);
|
||||
const library = publicLibrary(event);
|
||||
return {...library, stills:library.stills.filter(s=>existsSync(stillPath(owner,s.id))), clips:library.clips.filter(c=>existsSync(clipVideoPath(owner,c.id)))};
|
||||
});
|
||||
Reference in New Issue
Block a user