From 8afda609c3b0b0f6897ca2ea01fd19e85b4bb390 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 11 Jul 2007 13:02:28 +0000 Subject: [PATCH] extract some less --- oxdbarchive/model.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/oxdbarchive/model.py b/oxdbarchive/model.py index 87f289f..0e1522c 100644 --- a/oxdbarchive/model.py +++ b/oxdbarchive/model.py @@ -448,6 +448,12 @@ class ArchiveFile(SQLObject): def extractClipMovie(self, force = False): if self.broken: return + if not self.height: + #only if midentify works we should try to extract the clip + return + if self.path.split('.')[-1] in ('mp3', 'wav', 'srt', 'sub', 'idx', 'rar','jpg', 'png'): + #ignore files known to not be + return mini_movie_file = self.mini_movie_file movie_file = self.absolutePath if not movie_file or not exists(movie_file): @@ -491,8 +497,9 @@ class ArchiveFile(SQLObject): print "skipping, ", self.path return #this fails in tg-admin shell - #extractTimelineScript = abspath(join(dirname(__file__), "tools/extract_timeline.py")) - extractTimelineScript = "oxdbarchive/tools/extract_timeline.py" + extractTimelineScript = abspath(join(dirname(__file__), "tools/extract_timeline.py")) + #this fails is called inside server + #extractTimelineScript = "oxdbarchive/tools/extract_timeline.py" cmd = "python %s %s %s" %(extractTimelineScript, t, self.mini_movie_file) os.system(cmd)