extract extract, mkdir
This commit is contained in:
parent
8afda609c3
commit
2cdd6f1607
2 changed files with 9 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue