From: yomguy Date: Wed, 13 Mar 2013 13:12:03 +0000 (+0100) Subject: rm cleanup X-Git-Tag: 2.8.1-pro~491^2~11 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=cacc548f00f9bd3273a1a33ccf1b79a92baab5e5;p=teleforma.git rm cleanup --- diff --git a/teleforma/management/commands/teleforma-import-seminar-media.py b/teleforma/management/commands/teleforma-import-seminar-media.py index 12f4b491..7c451778 100644 --- a/teleforma/management/commands/teleforma-import-seminar-media.py +++ b/teleforma/management/commands/teleforma-import-seminar-media.py @@ -72,7 +72,7 @@ class Command(BaseCommand): self.media_dir = settings.MEDIA_ROOT + organization.name file_list = [] - self.cleanup() + # self.cleanup() walk = os.walk(self.media_dir, followlinks=True) @@ -139,7 +139,7 @@ class Command(BaseCommand): item.title = name item.file = path - + if os.path.getsize(root+os.sep+filename): item.approx_duration = self.get_duration(root+os.sep+filename) @@ -191,7 +191,7 @@ class Command(BaseCommand): filename, extension = os.path.splitext(file) if extension[1:] in self.original_format: item.file = r_path - if os.path.getsize(dir+os.sep+file): + if os.path.getsize(dir+os.sep+file): item.approx_duration = self.get_duration(dir+os.sep+file) item.save() print "preview added"