Lauraaaaaaaa ask before commiting to master

merge-requests/6/head
Dominika Liberda 2021-06-18 14:05:20 +00:00
commit 2fd9175a79
1 changed files with 14 additions and 0 deletions

View File

@ -77,6 +77,20 @@ if [[ "${get_data[v]}" ]]; then
strings[title]=$(jq -r '.title' <<< "$video")
if [[ ${cfg[template]} == 'default' ]]; then
meta[title]="${strings[title]}"
meta[description]="$(jq -r '.description' <<< "$video")"
meta[unsafe]="
<meta property='og:image' content='$(jq -r '.thumbnails[-1].url' <<< "$video")'>
<meta property='og:type' content='video.other'>
<meta property='video:duration' content='$(jq -r '.duration' <<< "$video")'>
"'<script type="application/ld+json">'"$(jq '{
"@context": "https://schema.org",
"@type": "VideoObject",
"name": .title,
"alternateName": .alt_title,
"description": .description,
"thumbnail": .thumbnails[-1].url,
"duration": ("PT" + (.duration | tostring) + "S"),
}' <<< "$video")"'</script>'
source templates/head.sh
fi
formats=$(jq '.formats' <<< "$video")