aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-common
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-common')
-rw-r--r--packages/meshbay-common/src/meshbay_common/__init__.py10
-rw-r--r--packages/meshbay-common/src/meshbay_common/adminop.py21
-rw-r--r--packages/meshbay-common/src/meshbay_common/protocol.py4
3 files changed, 25 insertions, 10 deletions
diff --git a/packages/meshbay-common/src/meshbay_common/__init__.py b/packages/meshbay-common/src/meshbay_common/__init__.py
index 938f5d4..53c1058 100644
--- a/packages/meshbay-common/src/meshbay_common/__init__.py
+++ b/packages/meshbay-common/src/meshbay_common/__init__.py
@@ -1,6 +1,6 @@
"""MeshBay common — shared crypto primitives and protocol types."""
-__version__ = "0.6.0"
+__version__ = "0.7.0"
# 0.2: added PING/PONG, and `before`/`has_more` on chat history. Both are
# additive — an 0.1 peer sends no `before` and gets the newest page, which is
# what it wanted — so this is a MINOR bump, not a MAJOR one.
@@ -18,5 +18,11 @@ __version__ = "0.6.0"
# and `tmdb_search_req`/`tmdb_search_resp` + `tmdb_override`/`tmdb_override_ack`
# (an operator correcting a wrong automatic TMDB match, found live against a
# real show fragmented across TMDB entries per season). All additive.
-MNP_VERSION = "0.6"
+# 0.7: added `tmdb_enabled`/`tmdb_enabled_ack` — whether TMDB is used moved
+# from a node-wide setting to per-group (an operator running a real media
+# library alongside test/demo groups on one node wants outbound TMDB traffic
+# for one, not all of them). `tmdb_config`/`tmdb_config_ack` keep their name
+# but now only cover the token/language, which stay node-wide. Additive: an
+# older client simply never sends/handles the new pair.
+MNP_VERSION = "0.7"
MHP_VERSION = "0.1"
diff --git a/packages/meshbay-common/src/meshbay_common/adminop.py b/packages/meshbay-common/src/meshbay_common/adminop.py
index 51396c7..df806a9 100644
--- a/packages/meshbay-common/src/meshbay_common/adminop.py
+++ b/packages/meshbay-common/src/meshbay_common/adminop.py
@@ -61,15 +61,22 @@ OP_APPS_ENABLED = "apps_enabled"
# security property in itself, but the pattern (every operator setting is
# signed) is what keeps the authorization model simple to reason about.
OP_SET_SCAN_SETTINGS = "set_scan_settings"
-# Whether the node calls TMDB at all, and whether it uses the operator's own
-# API token instead of the shipped default. Signed like the rest: it turns
-# on outbound third-party network traffic that did not exist before the
-# Videos app (docs/mediacenter.md §5.5, §8) — an unsigned toggle would let
-# any member turn on egress the operator never agreed to.
+# Whether the node uses the operator's own API token/language instead of the
+# shipped default — node-wide (docs/mediacenter.md §5.5), one credential
+# shared by every group. Signed like the rest: it turns on outbound
+# third-party network traffic that did not exist before the Videos app
+# (§8) — an unsigned change would let any member alter egress the operator
+# never agreed to.
OP_TMDB_CONFIG = "tmdb_config"
+# Whether the node calls TMDB *at all* for this group — per-group, unlike
+# tmdb_config above: a real media-library group and a test/demo group on the
+# same node need not share the decision to spend TMDB quota and make
+# outbound requests. Signed for the same reason as tmdb_config.
+OP_TMDB_ENABLED = "tmdb_enabled"
# Which folder (possibly a subfolder of a shared root) is the Videos app's
-# entry point for this group — per-group, unlike tmdb_config. Signed like
-# the rest: it decides what every member's Videos tab shows.
+# entry point for this group — per-group, like tmdb_enabled above and
+# unlike tmdb_config's token/language. Signed like the rest: it decides what
+# every member's Videos tab shows.
OP_VIDEO_ROOT = "video_root"
# Correcting a wrong automatic TMDB match — signed for the same reason as
# tmdb_config: it changes what every member sees for a show/movie, node-wide
diff --git a/packages/meshbay-common/src/meshbay_common/protocol.py b/packages/meshbay-common/src/meshbay_common/protocol.py
index 900acc2..32dc373 100644
--- a/packages/meshbay-common/src/meshbay_common/protocol.py
+++ b/packages/meshbay-common/src/meshbay_common/protocol.py
@@ -94,8 +94,10 @@ class MNP:
MEDIA_META_RESP = "media_meta_resp" # node → client: TMDB metadata (or none)
VIDEO_ROOT = "video_root" # operator → node: which folder is the Videos entry point
VIDEO_ROOT_ACK = "video_root_ack"
- TMDB_CONFIG = "tmdb_config" # operator → node: enable/disable TMDB, set token
+ TMDB_CONFIG = "tmdb_config" # operator → node: set custom TMDB token/language (node-wide)
TMDB_CONFIG_ACK = "tmdb_config_ack" # node → everyone: new TMDB config (never the token)
+ TMDB_ENABLED = "tmdb_enabled" # operator → node: enable/disable TMDB for this group
+ TMDB_ENABLED_ACK = "tmdb_enabled_ack" # node → this group: new per-group TMDB enabled state
SEASON_META_REQ = "season_meta_req" # client → node: TMDB overview/poster for one season
SEASON_META_RESP = "season_meta_resp" # node → client: season-level TMDB fields (or none)
TMDB_SEARCH_REQ = "tmdb_search_req" # client → node: candidate TMDB matches for a query