From 956dfd6765fa0d8a447441563b82d5ef1d222b03 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 7 Aug 2007 08:44:42 +0000 Subject: [PATCH] bpp is float --- oxdbarchive/model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/oxdbarchive/model.py b/oxdbarchive/model.py index 7dc322f..c456e5a 100644 --- a/oxdbarchive/model.py +++ b/oxdbarchive/model.py @@ -224,7 +224,7 @@ class ArchiveFile(SQLObject): video = UnicodeCol() length = IntCol() size = IntCol() - bpp = IntCol(default = 0) + bpp = FloatCol(default = -1) pixels = IntCol(default = 0) date_added = DateTimeCol(default = datetime.now) @@ -561,10 +561,10 @@ class ArchiveFile(SQLObject): def updateBpp(self): if self.height and self.width and self.fps and self.bitrate: - bpp = int(self.height * self.width * self.fps / self.bitrate) + bpp = float(self.height * self.width * self.fps / self.bitrate) self.bpp = bpp else: - bpp = 0 + bpp = -1 return bpp def updatePixels(self):