Skip to content

Commit 8cbae1f

Browse files
authored
fix(loader): ensure imdb retry queue path exists (#145)
1 parent 2089e79 commit 8cbae1f

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

docker/pyproject.deps.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mcp-plex"
3-
version = "2.0.6"
3+
version = "2.0.7"
44
requires-python = ">=3.11,<3.13"
55
dependencies = [
66
"fastmcp>=2.11.2",

mcp_plex/loader/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ async def _process_imdb_retry_queue(
163163
def _persist_imdb_retry_queue(path: Path, queue: IMDbRetryQueue) -> None:
164164
"""Persist the retry queue to disk."""
165165

166+
path.parent.mkdir(parents=True, exist_ok=True)
166167
path.write_text(json.dumps(queue.snapshot()))
167168

168169

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "mcp-plex"
7-
version = "2.0.6"
7+
version = "2.0.7"
88

99
description = "Plex-Oriented Model Context Protocol Server"
1010
requires-python = ">=3.11,<3.13"

tests/test_loader_unit.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,11 @@ def test_imdb_retry_queue_desync_errors():
358358

359359

360360
def test_persist_imdb_retry_queue_writes_snapshot(tmp_path):
361-
path = tmp_path / "retry.json"
361+
path = tmp_path / "nested" / "dirs" / "retry.json"
362362
queue = IMDbRetryQueue(["tt1"])
363363
_persist_imdb_retry_queue(path, queue)
364364
assert json.loads(path.read_text()) == ["tt1"]
365+
assert path.exists()
365366

366367

367368
def test_ensure_collection_skips_existing():

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)