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

check if locator is http-link

parent 081e1578
......@@ -155,8 +155,8 @@ def _get_values_from_digital_object(msg, access_status):
def _is_remote_file(msg):
return 'locator' in msg and msg['locator'].startswith('http') \
and not msg['locator'].startswith('https://memobase.ch/')
return 'locator' in msg and not \
def _is_directly_fetchable(digital_object_resource):
......@@ -224,6 +224,10 @@ def _has_audio_snippet(record):
def _has_http_locator(digital_object):
'locator' in digital_object and digital_object['locator'].startswith('http')
def _create_audio_snippet_entry(record, mariadb_cursor):
snippet_record = record.copy()
snippet_record['sig'] = snippet_record['sig'] + '-intro'
......@@ -286,7 +290,8 @@ class MediametadataToDB:
if access_status == 'public' or access_status == 'closed':
for recordJsonData in records_json_data:
if 'type' in recordJsonData and \
recordJsonData['type'] == 'digitalObject':
recordJsonData['type'] == 'digitalObject' and \
_try_fetch_from_json_object(recordJsonData, record_values_for_db,
Supports Markdown
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