From b0981645e67eb82ef0b2c2e5050d7cf6e0959097 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 12 Aug 2007 09:18:54 +0000 Subject: [PATCH] notify all --- oxdbarchive/model.py | 8 ++++++++ oxdbarchive/tools/extract_timeline.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/oxdbarchive/model.py b/oxdbarchive/model.py index 4ae93c8..9ee146d 100644 --- a/oxdbarchive/model.py +++ b/oxdbarchive/model.py @@ -207,6 +207,14 @@ class Archive(SQLObject): def bootstrapFrontend(self): for f in self.files: self.notifyFrontend('add', f.md5sum) + + def fillFrontend(self): + data = read_url("%s/list" % self.baseUrlFrontend) + files = simplejson.loads(data) + md5sums = [str(f['md5sum']) for f in files.values()] + for f in ArchiveFile.select(NOT(IN(ArchiveFile.q.md5sum, md5sums))): + self.notifyFrontend('add', f.md5sum) + class ArchiveFile(SQLObject): ''' diff --git a/oxdbarchive/tools/extract_timeline.py b/oxdbarchive/tools/extract_timeline.py index 1dd0c63..9870fab 100755 --- a/oxdbarchive/tools/extract_timeline.py +++ b/oxdbarchive/tools/extract_timeline.py @@ -104,7 +104,7 @@ class GstTimeline: def usage(): print "" - print "usage: %s output_base_path video_file" % sys.argv[0] + print "usage: %s output.png video_file" % sys.argv[0] print "" sys.exit(1)