ADD thumbnail to database (#12)

* ADD thumbnail to database

* ADD thumbnail generation and retrieval functionality

* ADD thumbnail availability check in VideoCard component

* ADD ClipDTO to reduce exposed internals

* REFactor move APIResponse and VideoMetadata to dto package

* REMOVE unused props from VideoCard

* ADD isThumbnailAvailable function
This commit is contained in:
Dylan De Faoite
2025-07-17 23:21:01 +02:00
committed by GitHub
parent 4c49a1daf8
commit 87ad7e3537
26 changed files with 190 additions and 44 deletions

View File

@@ -176,6 +176,15 @@ const getClipById = async (id: string): Promise<Clip | null> => {
}
};
const isThumbnailAvailable = async (id: number): Promise<boolean> => {
const response = await fetch(`/api/v1/download/thumbnail/${id}`);
if (!response.ok) {
return false;
}
return true;
}
export {
uploadFile,
editFile,
@@ -184,5 +193,6 @@ export {
getMetadata,
getUser,
getClips,
getClipById
getClipById,
isThumbnailAvailable
};