Skip to content

Follow up video-library folder counts, gallery reuse, and thumbnail cleanup #1404

Description

@coderabbitai

Summary

Track follow-up cleanup identified during video-support work in #1402.

Required changes

  1. Extend db_get_all_folder_details to report video_count alongside the existing image_count.
  2. Reduce duplication between ChronologicalVideoGallery and ChronologicalGallery by extracting a shared generic/gallery abstraction once the video UI has stabilized.
  3. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions