summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src/meshbay_node/indexer
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-03 16:20:23 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-03 16:20:28 +0200
commit753653b4df62723b82d32799825135822886eac7 (patch)
tree14829922bf343e6353093eaceaa84986fe5f84df /packages/meshbay-node/src/meshbay_node/indexer
parent675beed6ff688733a9598f9d82d41578f48316be (diff)
downloadmeshbay-753653b4df62723b82d32799825135822886eac7.tar.gz
refactor(node): platform abstraction for Windows portability (W1-W2-W5-W6-W7)
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 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/indexer')
-rw-r--r--packages/meshbay-node/src/meshbay_node/indexer/enrich.py3
1 files changed, 2 insertions, 1 deletions
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,