digidau commited on
Commit
ceea7f2
·
verified ·
1 Parent(s): f262269

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -42
app.py CHANGED
@@ -158,18 +158,7 @@ def preview_layout(
158
  data[0]["start_time"] = 0
159
  data[0]["end_time"] = 999
160
 
161
- with open(
162
- qvm_json,
163
- "w",
164
- encoding="utf-8"
165
- ) as f:
166
-
167
- json.dump(
168
- data,
169
- f,
170
- ensure_ascii=False,
171
- indent=2
172
- )
173
  # =====================================
174
  # ASS
175
  # =====================================
@@ -340,35 +329,6 @@ def process(
340
  preview = json.load(f)
341
 
342
 
343
- #if not data:
344
- # raise Exception("No subtitle data")
345
-
346
- preview_json = (
347
- "temp/preview_only.json"
348
- )
349
-
350
- #first = data[0]
351
-
352
- preview_data = [
353
- {
354
- **first,
355
- "start_time": 0,
356
- "end_time": 5
357
- }
358
- ]
359
-
360
- with open(
361
- preview_json,
362
- "w",
363
- encoding="utf-8"
364
- ) as f:
365
-
366
- json.dump(
367
- preview_data,
368
- f,
369
- ensure_ascii=False,
370
- indent=2
371
- )
372
 
373
  print(
374
  "TOTAL SUBTITLES:",
@@ -406,7 +366,7 @@ def process(
406
 
407
  generate_ass(
408
  qvm_json,
409
- preview_ass,
410
  arabic_font,
411
  arabic_y,
412
  translation_gap,
 
158
  data[0]["start_time"] = 0
159
  data[0]["end_time"] = 999
160
 
161
+
 
 
 
 
 
 
 
 
 
 
 
162
  # =====================================
163
  # ASS
164
  # =====================================
 
329
  preview = json.load(f)
330
 
331
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
 
333
  print(
334
  "TOTAL SUBTITLES:",
 
366
 
367
  generate_ass(
368
  qvm_json,
369
+ subtitle_path,
370
  arabic_font,
371
  arabic_y,
372
  translation_gap,