Skip to content

Implement Videos Page with Video Support #1403

Description

@rohan-pandeyy

Summary

The app currently indexes images only (.jpg, .jpeg, .png). The sidebar has a Videos tab, but it routes to the generic ComingSoon page, so any video sitting in a user's library is invisible to the app. We should scan for video files during the existing folder scan and surface them in the Videos tab.

Current behaviour

  • AppRoutes.tsx maps ROUTES.VIDEOS to <ComingSoon />.
  • The backend's file filter (image_util_is_valid_image) accepts only .jpg/.jpeg/.png, so videos in a registered folder are ignored entirely.
  • There is no videos table, route, or API client.

Two pieces of groundwork already exist but aren't connected to anything:

  • components/VideoPlayer/NetflixStylePlayer.tsx — a complete, tested custom player (play/pause, seek, volume, fullscreen, keyboard shortcuts). Its only importer is its own test file.
  • hooks/UseVideos.ts — calls a Tauri command get_all_videos_with_cache that does not exist in src-tauri, and is imported by nothing. This is dead code and should be removed rather than built on.

Proposed behaviour

Videos appear in the Videos tab in a gallery that follows the same design language as the Images tab (chronological grouping, month headers, timeline scrollbar), with thumbnails and durations. Clicking one opens it full-screen in the existing NetflixStylePlayer.

Scope

In scope (first step)

  • Scan registered folders for video files and index them
  • Generate a poster-frame thumbnail per video
  • Expose a listing endpoint plus favourite toggling
  • Videos tab gallery + full-screen playback

Out of scope (follow-up)

  • AI tagging / object detection / semantic search for videos. The schema shouldn't preclude adding it later.

Notes and open questions

  • Storage: per Rahul's guidance, videos should live in a separate videos table, not share the images table. Existing FKs (image_classes, faces, image_embeddings) point specifically at images(id), so a parallel table is the cleaner fit.
  • Formats: worth deciding deliberately. Tauri on Windows uses WebView2, where <video> reliably plays MP4/WebM/MOV(H.264) but generally cannot play MKV/AVI/WMV. Indexing formats the player can't decode would show users files that fail on click, so a conservative, playable-only list is probably the right default — easy to widen later.
  • Thumbnails: opencv-python is already a backend dependency and can grab a frame without adding anything new. Videos whose codec OpenCV can't decode should still be indexed (with a placeholder) rather than silently dropped.
  • Watcher: the sync-microservice watches directories and fires /folders/sync-folder on any file change with no extension filter, so it should need no changes — worth confirming.

Activity

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

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions