From b7b57a259f8028534bb22aeeb06cdef1e1d469aa Mon Sep 17 00:00:00 2001 From: Dylan De Faoite Date: Wed, 17 Dec 2025 23:56:26 +0000 Subject: [PATCH] PATCH missing function call from paths.py Caused the following calls to treat as a direct function object instead of the return from the function --- rewind/paths.py | 4 ++-- rewind/video.py | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/rewind/paths.py b/rewind/paths.py index 3953dcb..a4c42f0 100644 --- a/rewind/paths.py +++ b/rewind/paths.py @@ -13,9 +13,9 @@ def get_state_file_path() -> Path: return state_dir() / "state.json" def load_state() -> dict: - if not get_state_file_path.exists(): + if not get_state_file_path().exists(): return {"files": []} - with get_state_file_path.open() as f: + with get_state_file_path().open() as f: return json.load(f) def write_state(state: dict): diff --git a/rewind/video.py b/rewind/video.py index 75b8c3d..dd0b925 100644 --- a/rewind/video.py +++ b/rewind/video.py @@ -1,11 +1,9 @@ import os, subprocess, datetime, json -from rewind.paths import get_state_file - -STATE_FILE = get_state_file() +from rewind.paths import load_state def save(seconds, output_file): - ts_files = STATE_FILE.get("files", []) + ts_files = load_state().get("files", []) ts_files[-1]["duration"] = get_duration(ts_files[-1]["path"]) total_duration = 0.0