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()
|
video = UnicodeCol()
|
||||||
length = IntCol()
|
length = IntCol()
|
||||||
size = IntCol()
|
size = IntCol()
|
||||||
bpp = IntCol(default = 0)
|
bpp = FloatCol(default = -1)
|
||||||
pixels = IntCol(default = 0)
|
pixels = IntCol(default = 0)
|
||||||
|
|
||||||
date_added = DateTimeCol(default = datetime.now)
|
date_added = DateTimeCol(default = datetime.now)
|
||||||
|
@ -561,10 +561,10 @@ class ArchiveFile(SQLObject):
|
||||||
|
|
||||||
def updateBpp(self):
|
def updateBpp(self):
|
||||||
if self.height and self.width and self.fps and self.bitrate:
|
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
|
self.bpp = bpp
|
||||||
else:
|
else:
|
||||||
bpp = 0
|
bpp = -1
|
||||||
return bpp
|
return bpp
|
||||||
|
|
||||||
def updatePixels(self):
|
def updatePixels(self):
|
||||||
|
|
Loading…
Reference in a new issue