From 66897c5d22ce9a7495668162c92b6c1702a799ab Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Wed, 25 Dec 2024 20:59:20 +0100 Subject: [PATCH] Fix sync using from hash representation for retrieving "missing" files. --- src/sync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sync.py b/src/sync.py index dde4348..bd7a74a 100755 --- a/src/sync.py +++ b/src/sync.py @@ -8,7 +8,7 @@ from urllib.request import urlopen # non-included libs from paramiko import SSHClient # type: ignore from scp import SCPClient # type: ignore -from ytplom.db import DbConn, PATH_DB +from ytplom.db import DbConn, Hash, PATH_DB from ytplom.misc import ( PATH_TEMP, Config, QuotaLog, VideoFile, YoutubeQuery, YoutubeVideo) from ytplom.http import PAGE_NAMES @@ -101,7 +101,7 @@ def fill_missing(scp: SCPClient, config: Config) -> None: direction, mover = direction_mover for digest in (d for d in missings[i] if d not in missings[int(not bool(i))]): - vf = VideoFile.get_one(conn, digest) + vf = VideoFile.get_one(conn, Hash.from_b64(digest)) print(f'SYNC: sending {direction} file {vf.full_path}') mover(vf.full_path, vf.full_path) -- 2.30.2