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
This commit is contained in:
2025-12-17 23:56:26 +00:00
parent 739ff6d208
commit b7b57a259f
2 changed files with 4 additions and 6 deletions

View File

@@ -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):

View File

@@ -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