From 8087594ccbb0aa09d8b64a41cbace94a7270f450 Mon Sep 17 00:00:00 2001 From: TheErrorExe Date: Sun, 2 Feb 2025 11:56:11 +0100 Subject: [PATCH] small changes --- README.md | 2 +- revivetube.py | 23 +++-------------------- site_storage/index_template.html | 6 +++--- site_storage/loading_template.html | 2 +- 4 files changed, 8 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index d4cabc3..a43098e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Watch YouTube on your Wii! ReviveTube: http://yt.old.errexe.xyz/ -ReviveMii Homepage: https://revivemii.errexe.xyz +ReviveMii Homepage: https://revivemii.errexe.xyz/ # Self Hosting diff --git a/revivetube.py b/revivetube.py index 2323ac4..d56a384 100644 --- a/revivetube.py +++ b/revivetube.py @@ -47,7 +47,6 @@ def start_folder_check(): VIDEO_FOLDER = "sigma/videos" -API_BASE_URL = "https://y.com.sb/api/v1/" YOUTUBE_API_URL = "https://www.googleapis.com/youtube/v3/videos" video_status = {} @@ -71,25 +70,9 @@ def get_folder_size(path): return total_size -""" -[UNUSED IN THE CURRENT VERSION] - -def delete_videos_periodically(): - while True: - time.sleep(86400) - for filename in os.listdir(VIDEO_FOLDER): - file_path = os.path.join(VIDEO_FOLDER, filename) - if os.path.isfile(file_path): - os.remove(file_path) - print(f"Deleted: {file_path}") - -threading.Thread(target=delete_videos_periodically, daemon=True).start() -""" INDEX_TEMPLATE = helper.read_file(f"site_storage{FILE_SEPARATOR}index_template.html") -WATCH_STANDARD_TEMPLATE = helper.read_file(f"site_storage{FILE_SEPARATOR}watch_standard_template.html") - WATCH_WII_TEMPLATE = helper.read_file(f"site_storage{FILE_SEPARATOR}watch_wii_template.html") @@ -217,7 +200,7 @@ def watch(): if video_duration > 420: alert_script = """ """ @@ -350,7 +333,7 @@ def video_metadata(video_id): data = response.json() if "items" not in data or len(data["items"]) == 0: - return f"Video mit ID {video_id} wurde nicht gefunden.", 404 + return f"The Video with ID {video_id} was not found.", 404 video_data = data["items"][0] title = video_data["snippet"]["title"] @@ -374,7 +357,7 @@ def video_metadata(video_id): } except requests.exceptions.RequestException as e: - return f"Fehler bei der API-Anfrage: {str(e)}", 500 + return f"API Error: {str(e)}", 500 @app.route("/") diff --git a/site_storage/index_template.html b/site_storage/index_template.html index 074f46d..19acc81 100644 --- a/site_storage/index_template.html +++ b/site_storage/index_template.html @@ -2,7 +2,7 @@ - ReviveTube by ReviveMii + ReviveTube - A YouTube App for the Wii