Skip to content

Commit b6d9af2

Browse files
authored
Merge pull request #30 from amiaopensource/caption-metadata
add end_eligibility to filler and rename caption_type
2 parents 87d5648 + 959b908 commit b6d9af2

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

pbprotracktor

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ psql -Ath "$PROTRACK_DB_URL" -U "$PROTRACK_DB_USER" -d protrack -c "\
276276
CASE WHEN vsn_caption is not null THEN
277277
XMLELEMENT(NAME \"pbcoreAnnotation\",
278278
XMLATTRIBUTES(
279-
'protrack:vsn_caption' as \"annotationType\"
279+
'protrack:caption_type' as \"annotationType\"
280280
),
281281
trim(vsn_caption))
282282
END,
@@ -368,6 +368,24 @@ psql -Ath "$PROTRACK_DB_URL" -U "$PROTRACK_DB_USER" -d protrack -c "\
368368
fi_length
369369
)
370370
END
371+
),
372+
CASE WHEN fi_caption is not null THEN
373+
XMLELEMENT(NAME \"pbcoreAnnotation\",
374+
XMLATTRIBUTES(
375+
'protrack:caption_type' as \"annotationType\"
376+
),
377+
trim(fi_caption))
378+
END,
379+
(SELECT
380+
XMLELEMENT(NAME \"pbcoreAnnotation\",
381+
XMLATTRIBUTES(
382+
'protrack:end_eligibility' as \"annotationType\"
383+
),
384+
fillelig.fiel_end_date)
385+
FROM fillelig
386+
WHERE filler.fi_serial = fillelig.fiel_fi_id
387+
ORDER BY fillelig.fiel_end_date DESC
388+
LIMIT 1
371389
)
372390
)
373391
) as pbcore_filler_xml

0 commit comments

Comments
 (0)