From: Christian Heller <c.heller@plomlompom.de>
Date: Sun, 1 Dec 2024 01:35:21 +0000 (+0100)
Subject: Fix sync script bug of trying to JSONize pathlib.Path objects.
X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/bar%20baz.html?a=commitdiff_plain;h=afc7862b1527927b4acce091b27c5d2321940e0e;p=ytplom

Fix sync script bug of trying to JSONize pathlib.Path objects.
---

diff --git a/src/ytplom/http.py b/src/ytplom/http.py
index 9cfc48b..24c40b3 100644
--- a/src/ytplom/http.py
+++ b/src/ytplom/http.py
@@ -292,7 +292,7 @@ class _TaskHandler(BaseHTTPRequestHandler):
 
     def _send_missing_json(self) -> None:
         with DbConn() as conn:
-            missing = [f.rel_path for f in VideoFile.get_all(conn)
+            missing = [str(f.rel_path) for f in VideoFile.get_all(conn)
                        if f.missing]
         self._send_http(bytes(json_dumps(missing), 'utf8'),
                         headers=[('Content-type', 'application/json')])