mirror of
https://github.com/ReviveMii/revivetube
synced 2025-04-29 04:29:25 -04:00
Cleaned up more
This commit is contained in:
parent
c7eb1f7c13
commit
f0b20b74d0
5 changed files with 111 additions and 102 deletions
|
@ -1,6 +1,7 @@
|
|||
import os
|
||||
import time
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
|
||||
def get_folder_size(folder_path):
|
||||
total_size = 0
|
||||
|
@ -11,6 +12,7 @@ def get_folder_size(folder_path):
|
|||
total_size += os.path.getsize(filepath)
|
||||
return total_size
|
||||
|
||||
|
||||
def delete_files(folder_path, extensions):
|
||||
os.system('sudo pkill -f revivetube.py')
|
||||
process = subprocess.Popen(['sudo', 'nohup', 'python3', 'revivetube.py'])
|
||||
|
@ -23,6 +25,7 @@ def delete_files(folder_path, extensions):
|
|||
except:
|
||||
print("ERROR")
|
||||
|
||||
|
||||
def monitor_folder(folder_path, size_limit_gb, check_interval):
|
||||
size_limit_bytes = size_limit_gb * 1024 * 1024 * 1024
|
||||
while True:
|
||||
|
@ -31,6 +34,7 @@ def monitor_folder(folder_path, size_limit_gb, check_interval):
|
|||
delete_files(folder_path, [".flv", ".mp4"])
|
||||
time.sleep(check_interval)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
folder_to_monitor = "./sigma/videos/"
|
||||
size_limit = 7
|
||||
|
|
|
@ -32,6 +32,7 @@ def get_video_duration_from_file(video_path):
|
|||
print(f"Can't fetch Video-Duration: {str(e)}")
|
||||
return 0
|
||||
|
||||
|
||||
def format_duration(seconds):
|
||||
minutes = seconds // 60
|
||||
seconds = seconds % 60
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
<title>ReviveTube by ReviveMii</title>
|
||||
<style>
|
||||
body {
|
||||
|
@ -79,7 +79,7 @@
|
|||
<h1>ReviveTube by ReviveMii</h1>
|
||||
<p>A YouTube App for the Wii</p>
|
||||
<form action="/" method="get">
|
||||
<input class="search-bar" type="text" name="query" placeholder="Search YouTube">
|
||||
<input class="search-bar" name="query" placeholder="Search YouTube" type="text">
|
||||
<button type="submit">Go</button>
|
||||
</form>
|
||||
{% if results %}
|
||||
|
@ -88,7 +88,7 @@
|
|||
{% for video in results %}
|
||||
<div class="video-item">
|
||||
<a href="/watch?video_id={{ video['id'] }}">
|
||||
<img src="{{ video['thumbnail'] }}" alt="{{ video['title'] }}">
|
||||
<img alt="{{ video['title'] }}" src="{{ video['thumbnail'] }}">
|
||||
<div class="video-item-title">{{ video['title'] }}</div>
|
||||
<div class="video-item-uploader">By: {{ video['uploader'] }}</div>
|
||||
<div class="video-item-duration">Duration: {{ video['duration'] }}</div>
|
||||
|
@ -99,9 +99,11 @@
|
|||
{% endif %}
|
||||
<p><a href="http://revivemii.errexe.xyz" target="_blank">Visit ReviveMii</a></p>
|
||||
<p style="color: red;">\/ Scroll down \/</p>
|
||||
<p style="font-size: 12px;">We are NOT affiliated with Nintendo or YouTube. This app uses code from Wiinet.xyz. For more information, scroll down to Open Source Software.</p>
|
||||
<p style="font-size: 12px;">We are NOT affiliated with Nintendo or YouTube. This app uses code from Wiinet.xyz. For more
|
||||
information, scroll down to Open Source Software.</p>
|
||||
<p style="color: blue">It's recommended to bookmark this page. Some sites may take longer to load.</p>
|
||||
<a href="http://revivetube.errexe.xyz/revivetube/t-and-p.html">Terms of Service and Privacy Policy (Last Updated: 7. Dec 2024 12:41 CET)</a><br><br>
|
||||
<a href="http://revivetube.errexe.xyz/revivetube/t-and-p.html">Terms of Service and Privacy Policy (Last Updated: 7. Dec
|
||||
2024 12:41 CET)</a><br><br>
|
||||
<a href="https://github.com/ReviveMii/revivetube/" target="_blank">Source Code</a><br><br>
|
||||
<a href="http://revivetube.errexe.xyz/discord-redirect.html">Discord Server [Use a Compatible Device]</a>
|
||||
<p>Version: v2 Beta (Sometimes I forget to update the Version Number)</p>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
<title>Loading...</title>
|
||||
<style>
|
||||
body {
|
||||
|
@ -32,11 +32,12 @@
|
|||
</head>
|
||||
<body>
|
||||
<h1>Loading</h1>
|
||||
<img id="loadingGif" src="loading.gif" alt="Loading..." />
|
||||
<img alt="Loading..." id="loadingGif" src="loading.gif"/>
|
||||
<p id="progressText">Fetching Info...</p>
|
||||
<button id="goButton" onclick="startVideo()">Go</button>
|
||||
<br>
|
||||
<small style="color: grey">Loading Screen will NOT work in Dolphin Emulator.<br><br>Long Video = Longer Download and Converting.<br><br>For videos longer than 7 minutes, there is a chance that they won’t play.</small>
|
||||
<small style="color: grey">Loading Screen will NOT work in Dolphin Emulator.<br><br>Long Video = Longer Download and
|
||||
Converting.<br><br>For videos longer than 7 minutes, there is a chance that they won’t play.</small>
|
||||
<script type="text/javascript">
|
||||
var goButton = document.getElementById('goButton');
|
||||
var loadingGif = document.getElementById('loadingGif');
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
<title>{{ title }}</title>
|
||||
<style>
|
||||
body {
|
||||
|
@ -35,7 +35,7 @@
|
|||
</head>
|
||||
<body class="dark-mode" id="page-body">
|
||||
<div style="width: 100%; background-color: #000; text-align: center;">
|
||||
<object type="application/x-shockwave-flash" data="/player.swf" width="384" height="256">
|
||||
<object data="/player.swf" height="256" type="application/x-shockwave-flash" width="384">
|
||||
<param name="wmode" value="transparent">
|
||||
<param name="allowFullScreen" value="false">
|
||||
<param name="flashvars" value="filename={{ video_flv }}">
|
||||
|
@ -49,14 +49,15 @@
|
|||
<a href="#comments">Skip Description</a>
|
||||
<h3 style="color: red">Description:</h3>
|
||||
<p>{{ description | safe }}</p>
|
||||
<h3 id="comments" class="comments" style="color: red">Comments:</h3>
|
||||
<h3 class="comments" id="comments" style="color: red">Comments:</h3>
|
||||
<div class="comments">
|
||||
{% if comments %}
|
||||
{% for comment in comments %}
|
||||
<div class="comment">
|
||||
<p><strong>{{ comment.author }}</strong> posted:</p>
|
||||
<p>{{ comment.text|safe }}</p>
|
||||
<p style="color: gray; font-size: 12px;">Likes: {{ comment.likeCount }} | Post date: {{ comment.publishedAt }}</p>
|
||||
<p style="color: gray; font-size: 12px;">Likes: {{ comment.likeCount }} | Post date: {{ comment.publishedAt
|
||||
}}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
|
|
Loading…
Add table
Reference in a new issue