Unverified Commit 41519462 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

change logic of proto field

parent 3d966299
......@@ -148,15 +148,17 @@ def _get_values_from_digital_object(msg, access_status):
return_values['duration'] = duration
if 'isDistributedOn' in msg:
# //@formatter:off
if (msg['isDistributedOn'] == 'audio' or msg['isDistributedOn'] == 'image' or
msg['isDistributedOn'] == 'video') and uri.startswith('http'):
# // @formatter:on
if uri.startswith('http'):
if not (msg['isDistributedOn'] == 'audio' or msg['isDistributedOn'] == 'image' or
msg['isDistributedOn'] == 'video'):
# // @formatter:on
return_values['type'] = msg['isDistributedOn']
if access_status == 'public':
return_values['proto'] = 'redirect'
else:
return_values['proto'] = 'proxy'
else:
return_values['type'] = msg['isDistributedOn']
return_values['proto'] = 'file'
return return_values
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment