take frameAspect
This commit is contained in:
parent
956dfd6765
commit
1fb30ba07c
1 changed files with 4 additions and 3 deletions
|
@ -45,8 +45,9 @@ class Archive(SQLObject):
|
||||||
def notifyFrontend(self, action, md5sum):
|
def notifyFrontend(self, action, md5sum):
|
||||||
if self.baseUrlFrontend:
|
if self.baseUrlFrontend:
|
||||||
dto = socket.getdefaulttimeout()
|
dto = socket.getdefaulttimeout()
|
||||||
socket.setdefaulttimeout(100)
|
socket.setdefaulttimeout(256)
|
||||||
url = "%s/%s?md5sum=%s" % (self.baseUrlFrontend, action, md5sum)
|
url = "%s/%s?md5sum=%s" % (self.baseUrlFrontend, action, md5sum)
|
||||||
|
print url
|
||||||
result = read_url(url)
|
result = read_url(url)
|
||||||
#print "Frontend:", result['result']
|
#print "Frontend:", result['result']
|
||||||
socket.setdefaulttimeout(dto)
|
socket.setdefaulttimeout(dto)
|
||||||
|
@ -146,7 +147,7 @@ class Archive(SQLObject):
|
||||||
def importFrontend(self):
|
def importFrontend(self):
|
||||||
if self.baseUrlFrontend:
|
if self.baseUrlFrontend:
|
||||||
dto = socket.getdefaulttimeout()
|
dto = socket.getdefaulttimeout()
|
||||||
socket.setdefaulttimeout(100)
|
socket.setdefaulttimeout(256)
|
||||||
url = "%s/%s" % (self.baseUrlFrontend, 'list')
|
url = "%s/%s" % (self.baseUrlFrontend, 'list')
|
||||||
result = read_url(url)
|
result = read_url(url)
|
||||||
files = simplejson.loads(result)['files']
|
files = simplejson.loads(result)['files']
|
||||||
|
@ -431,7 +432,7 @@ class ArchiveFile(SQLObject):
|
||||||
position = inpoint.replace(':', '.')
|
position = inpoint.replace(':', '.')
|
||||||
flash_movie = join(self.frameFolder, '%s.%s' % (position, 'flv'))
|
flash_movie = join(self.frameFolder, '%s.%s' % (position, 'flv'))
|
||||||
width = 128
|
width = 128
|
||||||
height = int(width / (self.width / self.height))
|
height = int(width / self.frameAspect)
|
||||||
height = height - height % 2
|
height = height - height % 2
|
||||||
inpoint = inpoint.replace('.', ':')
|
inpoint = inpoint.replace('.', ':')
|
||||||
if outpoint == -1:
|
if outpoint == -1:
|
||||||
|
|
Loading…
Reference in a new issue