diff options
| author | Pinapelz <donaldshan1@outlook.com> | 2024-03-20 16:16:03 +0000 |
|---|---|---|
| committer | Pinapelz <donaldshan1@outlook.com> | 2024-03-20 16:16:03 +0000 |
| commit | 4e84325c15980ade9ccb2c0a37a23e540f41e769 (patch) | |
| tree | 9103044b3fb26201fd486fad5506177eaac53a94 /backend/fileutil.py | |
| parent | a300327d53618faf2bbfe72da96679d9d5f4ec43 (diff) | |
migrate codebase to Postgres SQL and add dotenv
Diffstat (limited to 'backend/fileutil.py')
| -rw-r--r-- | backend/fileutil.py | 16 |
1 files changed, 0 insertions, 16 deletions
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")): |
