bpp is float
This commit is contained in:
parent
48503770e0
commit
956dfd6765
1 changed files with 3 additions and 3 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue