fix: update media viewer layout and maintain aspect ratio for video thumbnails
- Adjusted the layout of media items in the folder viewer to ensure proper aspect ratio handling for video files. - Modified thumbnail size settings in the video thumbnail generation function to maintain aspect ratio while specifying a fixed width. - Updated the media database file to reflect recent changes.
This commit is contained in:
parent
caa0d1eab9
commit
2442d0dde7
|
|
@ -396,7 +396,7 @@ const FolderViewerPage = () => {
|
|||
</div>
|
||||
</div>
|
||||
) : isMediaFile(item) ? (
|
||||
<div className="relative w-full h-full">
|
||||
<div className={`relative overflow-hidden ${item.type === 'video' ? 'aspect-video' : 'aspect-[4/3]'}`}>
|
||||
<img
|
||||
src={item.thumbnail || (item.type === 'video' ? '/placeholder-video.svg' : '/placeholder-photo.svg')}
|
||||
alt={item.name}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ const generateVideoThumbnail = (videoPath: string, thumbnailPath: string) => {
|
|||
count: 1,
|
||||
folder: path.dirname(thumbnailPath),
|
||||
filename: path.basename(thumbnailPath),
|
||||
size: "320x240",
|
||||
size: "320x?", // Maintain aspect ratio, width 320px
|
||||
timemarks: ["10%"]
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue