dsh-watch-together 0.2.8 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,42 @@
3
3
  All notable changes to **dsh-watch-together** are documented here.
4
4
  This package starts its own version line at `0.0.7` — it is not a continuation of `dsh-video-storyboard`.
5
5
 
6
+ ## [0.2.9] - 2026-11-03
7
+
8
+ > 一条根因修得很漂亮的 bug:拖动窗口时的动态模糊。
9
+
10
+ ### Fixed — 拖动窗口没有动态模糊(合 PR #49,作者 @ggfgfgf-on,对应 #48)
11
+
12
+ 现象是「`GLASS_FORCE=1` 下能看到那种黏黏的拖尾,正常启动看不到」,我一开始以为是
13
+ `_motion_blur` 的衰减公式问题 —— 猜错了。
14
+
15
+ 真正的原因在这行:
16
+
17
+ ```python
18
+ if self._sig is not None and box == self._sig_bbox and sig.shape == self._sig.shape:
19
+ ```
20
+
21
+ 拖动窗口时抓取区域 `box = (gl, gt, gr, gb)` 每帧都在变,`box == self._sig_bbox` 永远不成立,
22
+ `moved` 一直是 `False`。于是:
23
+
24
+ - `_motion_blur` 一路乘 0.55 衰减到 0,混合那步一次都不执行;
25
+ - 反而每帧都在做 `apply_chroma(panel, 1.7)`(那是「没在动」时的色散补偿)。
26
+
27
+ `FORCE` 之所以看起来有效,只是因为它跳过静态跳帧、帧数更多,更容易凑出连续可混合的帧 ——
28
+ 它并没有修掉这个判断。
29
+
30
+ 现在 `_sig_bbox` 已存在且 `box` 变了,就把这一帧标成 `moved = True`:抓取区域变了,
31
+ 旧区域的像素本来也不能直接做差,但这确实是运动。静止窗口仍走原来的像素差判断,
32
+ 不会变成常驻拖影。和 #42 不冲突 —— `_invalidate_glass()` 会把 `_sig_bbox` 清成 `None`,
33
+ 形状变化后的第一帧不会误判成 `box_changed`。
34
+
35
+ ### 说明 — 静止画面下没有动态模糊是设计
36
+
37
+ 同一轮确认:`if moved` 这层是故意留的,运动模糊不是常驻滤镜。静止时混上一帧只会把文字和边缘
38
+ 永久糊一层,还会让 `_motion_blur` 维持在高位,停下后回不到清晰;CPU 每帧做一次 `Image.blend` 也不便宜。
39
+
40
+ 想要「低速拖尾」可以做配置项(类似 `motionBlurFloor`,默认 0),但不改默认行为。
41
+
6
42
  ## [0.2.8] - 2026-11-03
7
43
 
8
44
  > 三个社区 PR(都是 @ggfgfgf-on)+ 一批失效入口的清理。
package/dsh.plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-watch-together",
3
3
  "description": "Watch a video together with a text-only agent: follow the user's real playback position and hand over one segment at a time, just before the segment ends.",
4
- "version": "0.2.8",
4
+ "version": "0.2.9",
5
5
  "entry": {
6
6
  "name": "dsh-watch-together",
7
7
  "inject": [
@@ -994,7 +994,13 @@ class LiveGlass:
994
994
  box = (gl, gt, gr, gb)
995
995
  now = time.perf_counter()
996
996
  moved = False
997
- if self._sig is not None and box == self._sig_bbox and sig.shape == self._sig.shape:
997
+ # 窗口被拖动 / 跨屏移动时抓取区域每帧都在变,旧区域的像素不能直接做差;
998
+ # 但这仍然是运动。不标 moved 的话,拖动全程都走“无运动”分支:
999
+ # _motion_blur 一路衰减、混合永远不执行,只有 FORCE 强制多帧时才明显。
1000
+ box_changed = self._sig_bbox is not None and box != self._sig_bbox
1001
+ if box_changed:
1002
+ moved = True
1003
+ elif self._sig is not None and sig.shape == self._sig.shape:
998
1004
  d = np.abs(sig - self._sig)
999
1005
  moved = bool(float(d.mean()) > 0.01 or float(d.max()) > 0.5)
1000
1006
  if moved:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-watch-together",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "Watch a video together with a text-only agent: follow the user's real playback position, hand over one segment at a time just before it ends, and keep a single text stream of scripted lines, interjections and the user's replies.",
5
5
  "keywords": [
6
6
  "dsh",