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)