profile is a function now

This commit is contained in:
j 2014-04-02 12:33:49 +02:00
parent 3e9e53172f
commit fe7d0c7415

View file

@ -73,7 +73,7 @@ class Server(Resource):
return os.path.join(
self.client.media_cache(),
os.path.join(*hash_prefix(oshash)),
self.client.profile
self.client.profile(self.client.info(oshash))
)
def render_json(self, request, response):
@ -134,8 +134,8 @@ class Server(Resource):
if os.path.exists(f):
response['oshash'] = oshash
url = 'http://%s:%s/get/%s' % (request.host.host, request.host.port, oshash)
output = '/tmp/%s.%s' % (oshash, self.client.profile)
response['cmd'] = extract.video_cmd(url, output, self.client.profile, info)
output = '/tmp/%s.%s' % (oshash, self.client.profile(info))
response['cmd'] = extract.video_cmd(url, output, self.client.profile(info), info)
response['cmd'][0] = 'ffmpeg'
response['output'] = output
self.update_status(oshash, 'active')