Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -707,16 +707,18 @@ def save_srt():
|
|
707 |
#cleaned_path = re.sub(r'\\video\.mp4$', '', cleaned_path) # Odstraní '\video.mp4' na konci
|
708 |
cleaned_path = re.sub(r'^exports[\\/]', '', video_path)
|
709 |
cleaned_path = re.sub(r'[\\/]+video\.mp4$', '', cleaned_path)
|
710 |
-
print("===================")
|
711 |
print(cleaned_path)
|
712 |
else:
|
713 |
print("Hodnota video_path není v session.")
|
714 |
|
715 |
project_path = os.path.join('exports', cleaned_path)
|
|
|
716 |
print(project_path)
|
717 |
-
|
718 |
# Save SRT file in the same directory as video
|
719 |
srt_path = os.path.join(project_path, 'titulky.srt')
|
|
|
720 |
print(srt_path)
|
721 |
with open(srt_path, 'w', encoding='utf-8') as f:
|
722 |
f.write(srt_content)
|
|
|
707 |
#cleaned_path = re.sub(r'\\video\.mp4$', '', cleaned_path) # Odstraní '\video.mp4' na konci
|
708 |
cleaned_path = re.sub(r'^exports[\\/]', '', video_path)
|
709 |
cleaned_path = re.sub(r'[\\/]+video\.mp4$', '', cleaned_path)
|
710 |
+
print("===================cleaned")
|
711 |
print(cleaned_path)
|
712 |
else:
|
713 |
print("Hodnota video_path není v session.")
|
714 |
|
715 |
project_path = os.path.join('exports', cleaned_path)
|
716 |
+
print("===================project")
|
717 |
print(project_path)
|
718 |
+
|
719 |
# Save SRT file in the same directory as video
|
720 |
srt_path = os.path.join(project_path, 'titulky.srt')
|
721 |
+
print("===================srt")
|
722 |
print(srt_path)
|
723 |
with open(srt_path, 'w', encoding='utf-8') as f:
|
724 |
f.write(srt_content)
|