Skip to content

Commit

Permalink
Merge pull request #30 from amiaopensource/caption-metadata
Browse files Browse the repository at this point in the history
add end_eligibility to filler and rename caption_type
  • Loading branch information
dericed authored Apr 22, 2020
2 parents 87d5648 + 959b908 commit b6d9af2
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion pbprotracktor
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ psql -Ath "$PROTRACK_DB_URL" -U "$PROTRACK_DB_USER" -d protrack -c "\
CASE WHEN vsn_caption is not null THEN
XMLELEMENT(NAME \"pbcoreAnnotation\",
XMLATTRIBUTES(
'protrack:vsn_caption' as \"annotationType\"
'protrack:caption_type' as \"annotationType\"
),
trim(vsn_caption))
END,
Expand Down Expand Up @@ -368,6 +368,24 @@ psql -Ath "$PROTRACK_DB_URL" -U "$PROTRACK_DB_USER" -d protrack -c "\
fi_length
)
END
),
CASE WHEN fi_caption is not null THEN
XMLELEMENT(NAME \"pbcoreAnnotation\",
XMLATTRIBUTES(
'protrack:caption_type' as \"annotationType\"
),
trim(fi_caption))
END,
(SELECT
XMLELEMENT(NAME \"pbcoreAnnotation\",
XMLATTRIBUTES(
'protrack:end_eligibility' as \"annotationType\"
),
fillelig.fiel_end_date)
FROM fillelig
WHERE filler.fi_serial = fillelig.fiel_fi_id
ORDER BY fillelig.fiel_end_date DESC
LIMIT 1
)
)
) as pbcore_filler_xml
Expand Down

0 comments on commit b6d9af2

Please sign in to comment.