summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-common/src/meshbay_common/protocol.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-common/src/meshbay_common/protocol.py')
-rw-r--r--packages/meshbay-common/src/meshbay_common/protocol.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/packages/meshbay-common/src/meshbay_common/protocol.py b/packages/meshbay-common/src/meshbay_common/protocol.py
index 24fea8f..dd377e7 100644
--- a/packages/meshbay-common/src/meshbay_common/protocol.py
+++ b/packages/meshbay-common/src/meshbay_common/protocol.py
@@ -123,6 +123,11 @@ class MNP:
# shape as VIDEO_ROOT above.
AUDIO_ROOT = "audio_root" # operator → node: which folder is the Music entry point
AUDIO_ROOT_ACK = "audio_root_ack"
+ # Which folder(s) are the Photos app's entry points for this group — a
+ # *set*, unlike VIDEO_ROOT/AUDIO_ROOT above, since a photo library is
+ # routinely scattered across several unrelated folders (docs/photos.md §2.1).
+ PHOTO_ROOTS = "photo_roots" # operator → node: the whole root set, replaced
+ PHOTO_ROOTS_ACK = "photo_roots_ack"
# Device linking. A new device files a request bound to a code it displays;
# an already-pinned device of the same account approves it. Neither the hub
# nor the node can produce the countersignature.
@@ -174,14 +179,16 @@ class IndexEntry:
thumb_hash: str | None = None # blake3 of thumbnail
uploader_id: str | None = None # user_id of who uploaded (None = pre-existing on disk)
uploader_pk: str | None = None # Ed25519 public key of uploader (base64 raw 32 bytes)
- width: int | None = None # pixels, video only
- height: int | None = None # pixels, video only
+ width: int | None = None # pixels, video/image
+ height: int | None = None # pixels, video/image
display_title: str | None = None # parsed or cleaned-filename title, Videos app
season: int | None = None # parsed season number, Videos app
episode: int | None = None # parsed episode number, Videos app
artist: str | None = None # tag or parsed, Music app
album: str | None = None # tag or parsed, Music app
track_no: int | None = None # tag or parsed, Music app
+ taken_at: int | None = None # unix timestamp, EXIF DateTimeOriginal — Photos app
+ camera: str | None = None # "Make Model", when both present — Photos app
def index_entry_wire(e: IndexEntry) -> dict:
@@ -201,6 +208,7 @@ def index_entry_wire(e: IndexEntry) -> dict:
"display_title": e.display_title,
"season": e.season, "episode": e.episode,
"artist": e.artist, "album": e.album, "track_no": e.track_no,
+ "taken_at": e.taken_at, "camera": e.camera,
}