take frameAspect

This commit is contained in:
j 2007-08-08 11:57:20 +00:00
parent 956dfd6765
commit 1fb30ba07c

View file

@ -45,8 +45,9 @@ class Archive(SQLObject):
def notifyFrontend(self, action, md5sum):
if self.baseUrlFrontend:
dto = socket.getdefaulttimeout()
socket.setdefaulttimeout(100)
socket.setdefaulttimeout(256)
url = "%s/%s?md5sum=%s" % (self.baseUrlFrontend, action, md5sum)
print url
result = read_url(url)
#print "Frontend:", result['result']
socket.setdefaulttimeout(dto)
@ -146,7 +147,7 @@ class Archive(SQLObject):
def importFrontend(self):
if self.baseUrlFrontend:
dto = socket.getdefaulttimeout()
socket.setdefaulttimeout(100)
socket.setdefaulttimeout(256)
url = "%s/%s" % (self.baseUrlFrontend, 'list')
result = read_url(url)
files = simplejson.loads(result)['files']
@ -431,7 +432,7 @@ class ArchiveFile(SQLObject):
position = inpoint.replace(':', '.')
flash_movie = join(self.frameFolder, '%s.%s' % (position, 'flv'))
width = 128
height = int(width / (self.width / self.height))
height = int(width / self.frameAspect)
height = height - height % 2
inpoint = inpoint.replace('.', ':')
if outpoint == -1: