Spaces:
Paused
Paused
GilangAlRusliadi commited on
Commit ·
3b98836
1
Parent(s): 182da61
Thumnail
Browse files
app.py
CHANGED
|
@@ -39,24 +39,24 @@ if selected:
|
|
| 39 |
|
| 40 |
if st.button(f"Download and Cut {selected}"):
|
| 41 |
if selected == 'Youtube' or selected == 'Pornhub':
|
| 42 |
-
video_file, judul_video, video_info = fungsi(video_link, resolution)
|
| 43 |
elif selected == 'Iwara' or selected == 'Mega':
|
| 44 |
-
video_file, judul_video, video_info = fungsi(video_link, name)
|
| 45 |
else:
|
| 46 |
-
video_file, judul_video, video_info = fungsi(video_link)
|
| 47 |
video_file = cut_video(video_file, judul_video, start_time, end_time)
|
| 48 |
file_size = os.path.getsize(video_file)
|
| 49 |
-
session(video_info, video_file, cut)
|
| 50 |
st.text_input(f"Video '{judul_video}' setelah diproses:", convert_size(file_size))
|
| 51 |
|
| 52 |
else:
|
| 53 |
if st.button(f"Download {selected}"):
|
| 54 |
if selected == 'Youtube' or selected == 'Pornhub':
|
| 55 |
-
video_file, judul_video, video_info = fungsi(video_link, resolution)
|
| 56 |
elif selected == 'Iwara' or selected == 'Mega':
|
| 57 |
-
video_file, judul_video, video_info = fungsi(video_link, name)
|
| 58 |
else:
|
| 59 |
video_file, judul_video, video_info = fungsi(video_link)
|
| 60 |
file_size = os.path.getsize(video_file)
|
| 61 |
-
session(video_info, video_file, cut)
|
| 62 |
st.text_input(f"Video '{judul_video}' setelah diproses:", convert_size(file_size))
|
|
|
|
| 39 |
|
| 40 |
if st.button(f"Download and Cut {selected}"):
|
| 41 |
if selected == 'Youtube' or selected == 'Pornhub':
|
| 42 |
+
video_file, judul_video, video_info, thumbnail_file = fungsi(video_link, resolution)
|
| 43 |
elif selected == 'Iwara' or selected == 'Mega':
|
| 44 |
+
video_file, judul_video, video_info, thumbnail_file = fungsi(video_link, name)
|
| 45 |
else:
|
| 46 |
+
video_file, judul_video, video_info, thumbnail_file = fungsi(video_link)
|
| 47 |
video_file = cut_video(video_file, judul_video, start_time, end_time)
|
| 48 |
file_size = os.path.getsize(video_file)
|
| 49 |
+
session(video_info, video_file, thumbnail_file, cut)
|
| 50 |
st.text_input(f"Video '{judul_video}' setelah diproses:", convert_size(file_size))
|
| 51 |
|
| 52 |
else:
|
| 53 |
if st.button(f"Download {selected}"):
|
| 54 |
if selected == 'Youtube' or selected == 'Pornhub':
|
| 55 |
+
video_file, judul_video, video_info, thumbnail_file = fungsi(video_link, resolution)
|
| 56 |
elif selected == 'Iwara' or selected == 'Mega':
|
| 57 |
+
video_file, judul_video, video_info, thumbnail_file = fungsi(video_link, name)
|
| 58 |
else:
|
| 59 |
video_file, judul_video, video_info = fungsi(video_link)
|
| 60 |
file_size = os.path.getsize(video_file)
|
| 61 |
+
session(video_info, video_file, thumbnail_file, cut)
|
| 62 |
st.text_input(f"Video '{judul_video}' setelah diproses:", convert_size(file_size))
|
others.py
CHANGED
|
@@ -51,7 +51,7 @@ def cut_video(filename, judul_video, start_time, end_time):
|
|
| 51 |
|
| 52 |
return output_file_path
|
| 53 |
|
| 54 |
-
def session(video_info, video_file, cut):
|
| 55 |
st.session_state.video_info = video_info
|
| 56 |
st.session_state.video_file = video_file
|
| 57 |
if cut:
|
|
|
|
| 51 |
|
| 52 |
return output_file_path
|
| 53 |
|
| 54 |
+
def session(video_info, video_file, thumbnail_file, cut):
|
| 55 |
st.session_state.video_info = video_info
|
| 56 |
st.session_state.video_file = video_file
|
| 57 |
if cut:
|