re-enable language/translate
This commit is contained in:
parent
7f11a62243
commit
98c680e89c
1 changed files with 1 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -93,12 +94,10 @@ def prepare_joint_annotations(result, target_length=200):
|
||||||
|
|
||||||
def extract_subtitles(item, user, layer, translate, gpu=False, join_sentences=False):
|
def extract_subtitles(item, user, layer, translate, gpu=False, join_sentences=False):
|
||||||
language = None
|
language = None
|
||||||
"""
|
|
||||||
if "language" not in item.data:
|
if "language" not in item.data:
|
||||||
language = None
|
language = None
|
||||||
else:
|
else:
|
||||||
language = ox.iso.langTo2Code(item.data["language"][0])
|
language = ox.iso.langTo2Code(item.data["language"][0])
|
||||||
"""
|
|
||||||
if not item.streams():
|
if not item.streams():
|
||||||
logger.error("skip item without media %s: %s", item.public_id)
|
logger.error("skip item without media %s: %s", item.public_id)
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Add table
Reference in a new issue