new cron functions

This commit is contained in:
j 2007-07-21 19:23:07 +00:00
parent 6ecd8c234e
commit f58ed28f01
2 changed files with 11 additions and 3 deletions

View file

@ -4,10 +4,19 @@
from model import *
def findeNew():
def findNew():
archive = Archive.get(1)
archive.importFiles()
def extractFrames():
for f in ArchiveFile.select(ArchiveFile.q.extracted == False):
f.extractFrames()
def extractTimelines():
for f in ArchiveFile.select(ArchiveFile.q.extracted == False):
f.extractTimeline()
def extractNew():
for f in ArchiveFile.select(ArchiveFile.q.extracted == False):
f.extractAll()
@ -16,7 +25,6 @@ def cleanScrapeitCache():
#remove files older than 30 days from scrapeit cache
os.system("""find /var/cache/scrapeit/ -type f -ctime +30 -exec rm '{}' \;""")
def cleanClipMovieCache():
cache = os.path.abspath('oxdb/cache/mini/')
for d, p, files in os.walk(cache):

View file

@ -488,7 +488,7 @@ class ArchiveFile(SQLObject):
options += " -ovc lavc -lavcopts vcodec=mjpeg"
options += " -af volnorm=1 -oac mp3lame -lameopts br=64:mode=3 -af resample=44100"
options += " -vf scale -zoom -xy 128"
options += ' "%s"' % movie_file
options += ' "%s"' % movie_file.replace('"', '\\"')
options += ' -o "%s"' % mini_movie_file
cmd = "mencoder %s >/dev/null 2>&1" % options
print cmd.encode('utf-8')