From: Guillaume Pellerin Date: Thu, 24 Jan 2013 10:04:03 +0000 (+0100) Subject: fix media check X-Git-Tag: 1.3-TC~52 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=f60a240b84cb657ac6264a002fa5e292474b2162;p=teleforma.git fix media check --- diff --git a/tools/trans/fix_chk_media.py b/tools/trans/fix_chk_media.py index 9f78f696..f564e8a3 100644 --- a/tools/trans/fix_chk_media.py +++ b/tools/trans/fix_chk_media.py @@ -25,21 +25,22 @@ class FixCheckMedia(object): mp3_fixed_log = 'mp3.fixed' mp3_tofix_log = 'mp3.tofix' - if ext == 'webm' and os.path.getsize(source) and not webm_fixed_log in dir_files: + if ext == 'webm' and os.path.getsize(source): print source - self.fix_webm(source) - log = root + os.sep + webm_fixed_log - os.system('touch ' + log) - log = root + os.sep + webm_tofix_log - if os.path.exists(log): - os.system('rm ' + log) + if not webm_fixed_log in dir_files: + self.fix_webm(source) + log = root + os.sep + webm_fixed_log + os.system('touch ' + log) + log = root + os.sep + webm_tofix_log + if os.path.exists(log): + os.system('rm ' + log) if mp3_tofix_log in dir_files and not mp3_fixed_log in dir_files: for file in dir_files: dest_ext = os.path.splitext(file)[1][1:] if dest_ext == 'mp3': dest = root + os.sep + file - self.fix_mp3(source, path) + self.fix_mp3(source, dest) log = root + os.sep + mp3_fixed_log os.system('touch ' + log) log = root + os.sep + mp3_tofix_log