extract some less

This commit is contained in:
j 2007-07-11 13:02:28 +00:00
parent b7f8d1fe8a
commit 8afda609c3

View file

@ -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)