Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
postprocessing
Media Metadata Indexer
Commits
41519462
Unverified
Commit
41519462
authored
Nov 09, 2020
by
Sebastian Schüpbach
Browse files
change logic of proto field
parent
3d966299
Changes
1
Hide whitespace changes
Inline
Side-by-side
mediametadatatodb_app/resources/MediametadataToDB.py
View file @
41519462
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment