Commit c488eb8c7d6f827eb6182a5560f12de7aa2017d1
1 parent
90ae3b16
Exists in
release
extractor worker release - ok
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
core/extractor.py
@@ -79,7 +79,7 @@ def run(ch, method, properties, body): | @@ -79,7 +79,7 @@ def run(ch, method, properties, body): | ||
79 | subtitle = pysrt.open(filename, encoding='iso-8859-1') | 79 | subtitle = pysrt.open(filename, encoding='iso-8859-1') |
80 | index = 1 | 80 | index = 1 |
81 | # Initialize the extraction of subtitles | 81 | # Initialize the extraction of subtitles |
82 | - print ("Extracting...",) | 82 | + print ("Extracting...") |
83 | logger.info("Extraindo legendas do arquivo") | 83 | logger.info("Extraindo legendas do arquivo") |
84 | for sub in subtitle: | 84 | for sub in subtitle: |
85 | pts = calculate_ms(str(sub.start)) | 85 | pts = calculate_ms(str(sub.start)) |
@@ -90,6 +90,8 @@ def run(ch, method, properties, body): | @@ -90,6 +90,8 @@ def run(ch, method, properties, body): | ||
90 | body['control-message'] = "FINALIZE" | 90 | body['control-message'] = "FINALIZE" |
91 | body['pts'] = -1 | 91 | body['pts'] = -1 |
92 | body['index'] = index | 92 | body['index'] = index |
93 | + #Number of subtitle extracted | ||
94 | + logger.info(str(index-1) + " Legendas extraídas") | ||
93 | # Clean temporary file | 95 | # Clean temporary file |
94 | logger.info("Removendo arquivo temporário") | 96 | logger.info("Removendo arquivo temporário") |
95 | os.remove(filename) | 97 | os.remove(filename) |