From 753653b4df62723b82d32799825135822886eac7 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Thu, 3 Sep 2026 16:20:23 +0200 Subject: refactor(node): platform abstraction for Windows portability (W1-W2-W5-W6-W7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Platform directories, signal handling, chmod guards, ffmpeg discovery, and platform-conditional CLI messages — all testable on Linux. See docs/WINDOWS-PORT.md §5 for the plan these implement. Co-Authored-By: Claude Opus 4.6 --- packages/meshbay-node/src/meshbay_node/indexer/enrich.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/meshbay-node/src/meshbay_node/indexer') diff --git a/packages/meshbay-node/src/meshbay_node/indexer/enrich.py b/packages/meshbay-node/src/meshbay_node/indexer/enrich.py index 8b2eca5..19ab9ce 100644 --- a/packages/meshbay-node/src/meshbay_node/indexer/enrich.py +++ b/packages/meshbay-node/src/meshbay_node/indexer/enrich.py @@ -161,8 +161,9 @@ def _synthetic_episode_number(file_path: Path, show_root: Path, season: int) -> async def _make_thumbnail(file_path: Path, duration: float | None) -> bytes | None: """One ffmpeg frame grab at ~10% of duration (or 5s if unknown), scaled down.""" seek = max(0.0, (duration or 50.0) * 0.1) + from meshbay_node.platform import ffmpeg_cmd proc = await asyncio.create_subprocess_exec( - "ffmpeg", "-v", "error", "-ss", str(seek), "-i", str(file_path), + ffmpeg_cmd(), "-v", "error", "-ss", str(seek), "-i", str(file_path), "-frames:v", "1", "-vf", f"scale={THUMB_WIDTH}:-1", "-f", "image2", "-c:v", "mjpeg", "pipe:1", stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, -- cgit v1.2.3