From 3b61a5e4b7f432485b97ea645a3c4a3cbcce2390 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 12 Jul 2007 19:08:39 +0000 Subject: [PATCH] default clips are 5seconds, add cron function --- oxdbarchive/cron.py | 10 ++++++++++ oxdbarchive/model.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/oxdbarchive/cron.py b/oxdbarchive/cron.py index 5d4ffdf..fa5aa98 100644 --- a/oxdbarchive/cron.py +++ b/oxdbarchive/cron.py @@ -13,6 +13,16 @@ def extractNew(): f.extractAll() +def cleanClipMovieCache(): + cache = os.path.abspath('oxdb/cache/mini/') + for d, p, files in os.walk(cache): + for f in files: + md5sum = f.replace('.avi', '') + try: + fm = ArchiveFile.byMd5sum(md5sum) + except: + os.remove(os.path.join(cache, d, f)) + #possible fuctions: ''' def extractSubtitles(): diff --git a/oxdbarchive/model.py b/oxdbarchive/model.py index a5ec579..29e9d87 100644 --- a/oxdbarchive/model.py +++ b/oxdbarchive/model.py @@ -421,7 +421,7 @@ class ArchiveFile(SQLObject): if s: outpoint = s['stop'] else: - outpoint = shift_time(2000, inpoint) + outpoint = shift_time(5000, inpoint) extract_flash(movie_file, flash_movie, inpoint, outpoint, width, height, offset = 0) #extract_flash_ng(self.absolutePath, flash_movie, inpoint, outpoint, width, height, offset)