From: Christian Heller <c.heller@plomlompom.de>
Date: Wed, 26 Feb 2025 13:50:48 +0000 (+0100)
Subject: Fix sync messages.
X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7B%7Bprefix%7D%7D/coming?a=commitdiff_plain;h=b4547d9eb18c5ba05c46d5c817140e3efd5972dc;p=ytplom

Fix sync messages.
---

diff --git a/src/ytplom/http.py b/src/ytplom/http.py
index c4af15d..4958b1e 100644
--- a/src/ytplom/http.py
+++ b/src/ytplom/http.py
@@ -355,7 +355,8 @@ class _TaskHandler(PlomHttpHandler):
 
     def _send_missing_json(self) -> None:
         with DbConn() as conn:
-            missing = [f.digest.b64 for f in VideoFile.get_all(conn)
+            missing = [f.digest.b64 for
+                       f in VideoFile.get_all_non_deleted(conn)
                        if f.missing]
         self._send_json(missing)
 
diff --git a/src/ytplom/sync.py b/src/ytplom/sync.py
index 5cc966b..13e49db 100644
--- a/src/ytplom/sync.py
+++ b/src/ytplom/sync.py
@@ -23,7 +23,7 @@ def _back_and_forth(sync_func: Callable,
                     shared: Any
                     ) -> None:
     """Run sync_func on arg pairs + shared, and again with pairs switched."""
-    host_names = 'local', 'remote'
+    host_names = 'remote', 'local'
     sync_func(host_names, dbs, shared)
     sync_func(*(tuple(reversed(list(t))) for t in (host_names, dbs)), shared)