diff --git a/scan_vids.py b/scan_vids.py old mode 100644 new mode 100755 index 91379d5..87a120e --- a/scan_vids.py +++ b/scan_vids.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env -S uv run # /// script # requires-python = ">=3.11" # dependencies = [ @@ -36,7 +36,7 @@ def hash_partial(f: Path) -> str: @contextlib.contextmanager def connect_db() -> typing.Generator[psycopg.Connection, typing.Any, typing.Any]: - with psycopg.connect("postgres://abdus:abdus@db.abdus.dev:5444/smut?sslmode=disable") as conn: + with psycopg.connect("postgres://abdus:abdus@db.abdus.dev:5444/snot?sslmode=disable") as conn: conn.row_factory = psycopg.rows.dict_row yield conn @@ -120,7 +120,7 @@ def scan_videos(con: psycopg.Connection, video_paths: list[Path]) -> None: ffprobe=probed.__dict__, hash_partial=file_hash, ) - logging.info(f"{progress} saved {f=}") + logging.info(f"{progress} saved: {f.name}") con.commit()