aboutsummaryrefslogtreecommitdiffstats
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.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/meshbay-common/src/meshbay_common/protocol.py b/packages/meshbay-common/src/meshbay_common/protocol.py
index 32dc373..3b5d428 100644
--- a/packages/meshbay-common/src/meshbay_common/protocol.py
+++ b/packages/meshbay-common/src/meshbay_common/protocol.py
@@ -104,6 +104,15 @@ class MNP:
TMDB_SEARCH_RESP = "tmdb_search_resp" # node → client: candidate list (id, title, year, poster)
TMDB_OVERRIDE = "tmdb_override" # operator → node: replace a show/movie's TMDB match
TMDB_OVERRIDE_ACK = "tmdb_override_ack"
+ # Music app (docs/musicbay.md) — same shape as the TMDB pair above, minus
+ # a credential: MusicBrainz read lookups need no API key, only a
+ # rate-limited, self-identifying client (§3 there).
+ MUSICBRAINZ_CONFIG = "musicbrainz_config" # operator → node: contact string
+ MUSICBRAINZ_CONFIG_ACK = "musicbrainz_config_ack" # node → everyone: new config (no secret)
+ MUSICBRAINZ_ENABLED = "musicbrainz_enabled" # operator → node: enable/disable
+ MUSICBRAINZ_ENABLED_ACK = "musicbrainz_enabled_ack" # node → this group: new enabled state
+ MUSIC_META_REQ = "music_meta_req" # client → node: metadata for a path
+ MUSIC_META_RESP = "music_meta_resp" # node → client: metadata (or none)
# 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.
@@ -160,6 +169,9 @@ class IndexEntry:
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
def index_entry_wire(e: IndexEntry) -> dict:
@@ -178,6 +190,7 @@ def index_entry_wire(e: IndexEntry) -> dict:
"width": e.width, "height": e.height,
"display_title": e.display_title,
"season": e.season, "episode": e.episode,
+ "artist": e.artist, "album": e.album, "track_no": e.track_no,
}