bpp is float

This commit is contained in:
j 2007-08-07 08:44:42 +00:00
parent 48503770e0
commit 956dfd6765

View file

@ -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):