Summary
Track follow-up cleanup identified during video-support work in #1402.
Required changes
- Extend
db_get_all_folder_details to report video_count alongside the existing image_count.
- Reduce duplication between
ChronologicalVideoGallery and ChronologicalGallery by extracting a shared generic/gallery abstraction once the video UI has stabilized.
- Remove thumbnail files when a folder is deleted. This applies to both image and video thumbnails; the image-side orphaning behavior predates the video feature.
Rationale
Folder details should accurately represent both supported media types, duplicated gallery logic will increase maintenance cost, and thumbnail cleanup prevents stale files from accumulating after folder deletion.
Affected areas
- Backend folder-detail database query/service (
db_get_all_folder_details)
- Frontend chronological image/video gallery components
- Folder-deletion and thumbnail-storage cleanup logic for images and videos
Acceptance criteria
- Folder details expose a correct
video_count without changing image_count semantics.
- The image and video chronological galleries share the common grouping/timeline behavior while retaining media-specific rendering.
- Deleting a folder removes its associated image and video thumbnail files, including safely handling missing files.
- Relevant backend and frontend tests cover the changes.
References
Summary
Track follow-up cleanup identified during video-support work in #1402.
Required changes
db_get_all_folder_detailsto reportvideo_countalongside the existingimage_count.ChronologicalVideoGalleryandChronologicalGalleryby extracting a shared generic/gallery abstraction once the video UI has stabilized.Rationale
Folder details should accurately represent both supported media types, duplicated gallery logic will increase maintenance cost, and thumbnail cleanup prevents stale files from accumulating after folder deletion.
Affected areas
db_get_all_folder_details)Acceptance criteria
video_countwithout changingimage_countsemantics.References