diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-10 15:26:45 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-10 15:26:45 +0200 |
| commit | 1521cc1ac0cca7ee8786056f84fa399d5cc268f9 (patch) | |
| tree | 00cc3132ee05894350db12e8e5cb94f81b1d4876 /packages/meshbay-node/src | |
| parent | 1fd7bbcd038cddf40540bae7083b9adf4c728912 (diff) | |
| download | meshbay-1521cc1ac0cca7ee8786056f84fa399d5cc268f9.tar.gz | |
feat(photos): show a phone's clips in their albums
Videos in a photo folder are thumbnailed by the node, counted and marked in
the album, and played in the group's video player from the lightbox; the
slideshow passes them by.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/src')
| -rw-r--r-- | packages/meshbay-node/src/meshbay_node/enrichment.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/enrichment.py b/packages/meshbay-node/src/meshbay_node/enrichment.py index 66b69b9..19aafba 100644 --- a/packages/meshbay-node/src/meshbay_node/enrichment.py +++ b/packages/meshbay-node/src/meshbay_node/enrichment.py @@ -217,6 +217,11 @@ class EnrichmentMixin: actually photo albums would burn CPU on files never meant to be in the Photos app at all. `_enriched_attempted` is shared with the video/audio paths โ content-addressed ids never collide across them. + + A video in a photo folder (a phone's clips, backed up beside its + photos, ยง9.12) is probed and thumbnailed by the video enricher, which + is all an album tile and the lightbox need. Nothing there looks it up + anywhere: matching is the Videos app's, asked by its own pages. """ if not self._photo_enricher or not self._roster: return @@ -224,7 +229,9 @@ class EnrichmentMixin: if not photo_dirs: return for entry in entries: - if entry.type != "image" or (indexer.group_id, entry.id) in self._enriched_attempted: + if entry.type not in ("image", "video") or (indexer.group_id, entry.id) in self._enriched_attempted: + continue + if entry.type == "video" and not self._enricher: continue if not _under_any_directory(entry.path, photo_dirs): continue @@ -236,7 +243,10 @@ class EnrichmentMixin: async def on_done(file_id: str, fields: dict, _indexer=indexer) -> None: await self._on_enriched(_indexer, file_id, fields) - self._photo_enricher.spawn(entry, file_path, on_done) + if entry.type == "video": + self._enricher.spawn(entry, file_path, on_done) + else: + self._photo_enricher.spawn(entry, file_path, on_done) async def _enrich_photo_roots_now(self, group_id: str) -> None: """ @@ -269,7 +279,7 @@ class EnrichmentMixin: unchanged file is redundant work, not a correctness issue. """ for entry in updates: - if entry.type != "image": + if entry.type not in ("image", "video"): continue old = previous.get_entry(entry.id) if old is None or (old.name == entry.name and old.path == entry.path): |