From c4f2d8b13d7f8c908ebd77a67b30a490f290b7ec Mon Sep 17 00:00:00 2001 From: Vladimir Buzalka Date: Fri, 6 Mar 2026 17:25:47 +0100 Subject: [PATCH] git --- Seedbox/80 DeleteWhatWeHaveUltraCC2.py | 2 +- Seedbox/81 DeleteWhatWeHaveUltraCC.py | 4 ++-- Seedbox/82 DeleteWhatWeHaveUltraCC1.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Seedbox/80 DeleteWhatWeHaveUltraCC2.py b/Seedbox/80 DeleteWhatWeHaveUltraCC2.py index 5bd8832..d12beb3 100644 --- a/Seedbox/80 DeleteWhatWeHaveUltraCC2.py +++ b/Seedbox/80 DeleteWhatWeHaveUltraCC2.py @@ -63,7 +63,7 @@ def compute_blake3(path: Path) -> bytes: def hash_in_db(cursor, digest: bytes): """Vrátí (host_name, full_path) prvního záznamu s daným hashem, nebo None.""" cursor.execute( - "SELECT host_name, full_path FROM file_md5_index WHERE blake3 = %s AND host_name = 'tower1' AND full_path LIKE '/mnt/user/#ColdData/Porno/%' LIMIT 1", + "SELECT host_name, full_path FROM file_md5_index WHERE blake3 = %s AND host_name = 'tower1' AND full_path LIKE '/mnt/user/#ColdData/Porno/%%' LIMIT 1", (digest,) ) return cursor.fetchone() # None nebo (host_name, full_path) diff --git a/Seedbox/81 DeleteWhatWeHaveUltraCC.py b/Seedbox/81 DeleteWhatWeHaveUltraCC.py index 4639cd4..e8c3b62 100644 --- a/Seedbox/81 DeleteWhatWeHaveUltraCC.py +++ b/Seedbox/81 DeleteWhatWeHaveUltraCC.py @@ -42,7 +42,7 @@ DB_CONFIG = { } CHUNK_SIZE = 8 * 1024 * 1024 # 8 MB -DRY_RUN = False # True = pouze vypíše, nesmaže +DRY_RUN = True # True = pouze vypíše, nesmaže # ============================================================ # HELPERS @@ -63,7 +63,7 @@ def compute_blake3(path: Path) -> bytes: def hash_in_db(cursor, digest: bytes): """Vrátí (host_name, full_path) prvního záznamu s daným hashem, nebo None.""" cursor.execute( - "SELECT host_name, full_path FROM file_md5_index WHERE blake3 = %s AND host_name = 'tower1' AND full_path LIKE '/mnt/user/#ColdData/Porno/%' LIMIT 1", + "SELECT host_name, full_path FROM file_md5_index WHERE blake3 = %s AND host_name = 'tower1' AND full_path LIKE '/mnt/user/#ColdData/Porno/%%' LIMIT 1", (digest,) ) return cursor.fetchone() # None nebo (host_name, full_path) diff --git a/Seedbox/82 DeleteWhatWeHaveUltraCC1.py b/Seedbox/82 DeleteWhatWeHaveUltraCC1.py index d61a6e5..5c3f2b6 100644 --- a/Seedbox/82 DeleteWhatWeHaveUltraCC1.py +++ b/Seedbox/82 DeleteWhatWeHaveUltraCC1.py @@ -63,7 +63,7 @@ def compute_blake3(path: Path) -> bytes: def hash_in_db(cursor, digest: bytes): """Vrátí (host_name, full_path) prvního záznamu s daným hashem, nebo None.""" cursor.execute( - "SELECT host_name, full_path FROM file_md5_index WHERE blake3 = %s AND host_name = 'tower1' AND full_path LIKE '/mnt/user/#ColdData/Porno/%' LIMIT 1", + "SELECT host_name, full_path FROM file_md5_index WHERE blake3 = %s AND host_name = 'tower1' AND full_path LIKE '/mnt/user/#ColdData/Porno/%%' LIMIT 1", (digest,) ) return cursor.fetchone() # None nebo (host_name, full_path)