diff --git a/oxdbarchive/model.py b/oxdbarchive/model.py index 0e1522c..a5ec579 100644 --- a/oxdbarchive/model.py +++ b/oxdbarchive/model.py @@ -488,16 +488,19 @@ class ArchiveFile(SQLObject): if self.height <= 0: return + if not exists(self.mini_movie_file): + print "mini movie missing, skipping", self.path + return + t = self.timelineFile - if exists(self.mini_movie_file): - if not exists(os.path.dirname(t)): - os.makedirs(os.path.dirname(t)) - #lets only extract the timeline if it does not exist yet if exists(t): print "skipping, ", self.path return + if not exists(dirname(t)): + os.makedirs(dirname(t)) #this fails in tg-admin shell - extractTimelineScript = abspath(join(dirname(__file__), "tools/extract_timeline.py")) + #extractTimelineScript = abspath(join(dirname(__file__), "tools/extract_timeline.py")) + extractTimelineScript = abspath(join(dirname(cache.cache_root), "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) diff --git a/oxdbarchive/tools/extract_timeline.py b/oxdbarchive/tools/extract_timeline.py index f585829..1dd0c63 100644 --- a/oxdbarchive/tools/extract_timeline.py +++ b/oxdbarchive/tools/extract_timeline.py @@ -112,7 +112,7 @@ if __name__ == "__main__": if len(sys.argv) < 2: usage() if not os.path.exists(os.path.dirname(sys.argv[1])): - print "target does not exist" + print "target does not exist", sys.argv[1] sys.exit(1) g = GstTimeline(sys.argv[1])