Spaces:
Paused
Paused
Commit ·
cfdf719
1
Parent(s): 2954347
app.py
CHANGED
|
@@ -11,12 +11,12 @@ from trailer import trailer
|
|
| 11 |
from others import *
|
| 12 |
|
| 13 |
# Navigasi Sidebar
|
| 14 |
-
options = ['Youtube', 'Pornhub', 'Iwara', 'Mega', 'Rule34', 'Paipancon', 'Trailer']
|
| 15 |
with st.sidebar:
|
| 16 |
selected = option_menu("Video Downloader", options,
|
| 17 |
-
icons=['play', 'fire', 'star', 'moon','gear', 'house', 'lightning'], menu_icon="cast", default_index=0)
|
| 18 |
|
| 19 |
-
functions = [youtube, pornhub, iwara, download_youtube, rule34, paipancon, trailer]
|
| 20 |
|
| 21 |
if selected:
|
| 22 |
index = options.index(selected)
|
|
@@ -30,6 +30,15 @@ if selected:
|
|
| 30 |
elif selected == 'Iwara' or selected == 'Mega':
|
| 31 |
name = st.text_input("Nama File")
|
| 32 |
video_link = st.text_input("Link Video")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
else:
|
| 35 |
video_link = st.text_input("Link Video")
|
|
@@ -66,15 +75,6 @@ if selected:
|
|
| 66 |
file_size = os.path.getsize(video_file)
|
| 67 |
session(video_info, video_file, thumbnail_file, choice)
|
| 68 |
st.text_input(f"Video '{judul_video}' setelah diproses:", convert_size(file_size))
|
| 69 |
-
|
| 70 |
-
directory = '/home/user/app/Hasil Konversi'
|
| 71 |
-
files = os.listdir(directory)
|
| 72 |
-
if not files:
|
| 73 |
-
st.write('Folder is empty!')
|
| 74 |
-
else:
|
| 75 |
-
st.write('Files in directory:', directory)
|
| 76 |
-
for file in files:
|
| 77 |
-
st.write(file)
|
| 78 |
|
| 79 |
else:
|
| 80 |
if st.button(f"Download {selected}"):
|
|
|
|
| 11 |
from others import *
|
| 12 |
|
| 13 |
# Navigasi Sidebar
|
| 14 |
+
options = ['Youtube', 'Pornhub', 'Iwara', 'Mega', 'Rule34', 'Paipancon', 'Trailer', 'Cek Konversi']
|
| 15 |
with st.sidebar:
|
| 16 |
selected = option_menu("Video Downloader", options,
|
| 17 |
+
icons=['play', 'fire', 'star', 'moon','gear', 'house', 'lightning', 'lightning'], menu_icon="cast", default_index=0)
|
| 18 |
|
| 19 |
+
functions = [youtube, pornhub, iwara, download_youtube, rule34, paipancon, trailer, trailer]
|
| 20 |
|
| 21 |
if selected:
|
| 22 |
index = options.index(selected)
|
|
|
|
| 30 |
elif selected == 'Iwara' or selected == 'Mega':
|
| 31 |
name = st.text_input("Nama File")
|
| 32 |
video_link = st.text_input("Link Video")
|
| 33 |
+
elif selected == 'Cek Konversi':
|
| 34 |
+
directory = '/home/user/app/Hasil Konversi'
|
| 35 |
+
files = os.listdir(directory)
|
| 36 |
+
if not files:
|
| 37 |
+
st.write('Folder is empty!')
|
| 38 |
+
else:
|
| 39 |
+
st.write('Files in directory:', directory)
|
| 40 |
+
for file in files:
|
| 41 |
+
st.write(file)
|
| 42 |
|
| 43 |
else:
|
| 44 |
video_link = st.text_input("Link Video")
|
|
|
|
| 75 |
file_size = os.path.getsize(video_file)
|
| 76 |
session(video_info, video_file, thumbnail_file, choice)
|
| 77 |
st.text_input(f"Video '{judul_video}' setelah diproses:", convert_size(file_size))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
else:
|
| 80 |
if st.button(f"Download {selected}"):
|