From 4e84325c15980ade9ccb2c0a37a23e540f41e769 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Wed, 20 Mar 2024 16:16:03 +0000 Subject: migrate codebase to Postgres SQL and add dotenv --- backend/fileutil.py | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'backend/fileutil.py') diff --git a/backend/fileutil.py b/backend/fileutil.py index c12ae43..325ee0f 100644 --- a/backend/fileutil.py +++ b/backend/fileutil.py @@ -58,22 +58,6 @@ def get_local_channels(path: str = "data"): return [tuple(row.split(":")) for row in rows] -def check_diff_refresh(): - if not os.path.exists(os.path.join("data", "last_refresh.txt")): - with open( - os.path.join("data", "last_refresh.txt"), "w", encoding="utf-8") as file: - file.write(time.strftime("%Y-%m-%d")) - return True - with open(os.path.join("data", "last_refresh.txt"), "r", encoding="utf-8") as file: - last_refresh = file.read() - if last_refresh != time.strftime("%Y-%m-%d"): - with open( - os.path.join("data", "last_refresh.txt"), "w", encoding="utf-8" - ) as file: - file.write(time.strftime("%Y-%m-%d")) - return True - - def update_data_files(url: str) -> None: # Updates the local txt channel data stored in data folder if not os.path.exists(os.path.join("data", "channels.txt")): -- cgit v1.2.3