forked from STI/Astroport.ONE
poster=
This commit is contained in:
parent
f48b15abce
commit
ae0d7c1b18
|
@ -435,10 +435,13 @@ then
|
||||||
|
|
||||||
## Add screenshot (TODO : Make it better. Check what to put; if used & usefull
|
## Add screenshot (TODO : Make it better. Check what to put; if used & usefull
|
||||||
[[ -f $HOME/astroport/${TYPE}/${REFERENCE}/screen.png ]] && IPSCREEN=$(ipfs add -q "$HOME/astroport/${TYPE}/${REFERENCE}/screen.png" | tail -n 1)
|
[[ -f $HOME/astroport/${TYPE}/${REFERENCE}/screen.png ]] && IPSCREEN=$(ipfs add -q "$HOME/astroport/${TYPE}/${REFERENCE}/screen.png" | tail -n 1)
|
||||||
|
[[ $IPSCREEN ]] && POSTER=$IPSCREEN
|
||||||
|
|
||||||
[[ -f $HOME/astroport/${TYPE}/${REFERENCE}/thumbnail.png ]] && IPTHUMB=$(ipfs add -q "$HOME/astroport/${TYPE}/${REFERENCE}/thumbnail.png" | tail -n 1)
|
[[ -f $HOME/astroport/${TYPE}/${REFERENCE}/thumbnail.png ]] && IPTHUMB=$(ipfs add -q "$HOME/astroport/${TYPE}/${REFERENCE}/thumbnail.png" | tail -n 1)
|
||||||
|
[[ $IPTHUMB ]] && POSTER=$IPTHUMB
|
||||||
|
|
||||||
if [[ $(echo "$MIME" | grep 'video') ]]; then
|
if [[ $(echo "$MIME" | grep 'video') ]]; then
|
||||||
TEXT="<video controls preload='none' width=100% poster='/ipfs/"${IPSCREEN}"'><source src='/ipfs/"${IPFSID}"' type='"${MIME}"'>
|
TEXT="<video controls preload='none' width=100% poster='/ipfs/"${POSTER}"'><source src='/ipfs/"${IPFSID}"' type='"${MIME}"'>
|
||||||
</video><h1>"${TITLE}"</h1>
|
</video><h1>"${TITLE}"</h1>
|
||||||
<h2>"$DESCRIPTION"</h2>
|
<h2>"$DESCRIPTION"</h2>
|
||||||
<\$button class='tc-tiddlylink'>
|
<\$button class='tc-tiddlylink'>
|
||||||
|
@ -461,13 +464,13 @@ then
|
||||||
{
|
{
|
||||||
"text": "'${TEXT}'",
|
"text": "'${TEXT}'",
|
||||||
"title": "'${TITLE}'",
|
"title": "'${TITLE}'",
|
||||||
|
"created": "'${MOATS}'",
|
||||||
"type": "'${MIME}'",
|
"type": "'${MIME}'",
|
||||||
"mime": "'${REAL}'",
|
"mime": "'${REAL}'",
|
||||||
"cat": "'${CAT}'",
|
"cat": "'${CAT}'",
|
||||||
"size": "'${FILE_BSIZE}'",
|
"size": "'${FILE_BSIZE}'",
|
||||||
"description": "'${DESCRIPTION}'",
|
"description": "'${DESCRIPTION}'",
|
||||||
"screencapture": "'/ipfs/${IPSCREEN}'",
|
"poster": "'/ipfs/${POSTER}'",
|
||||||
"thumbnail": "'/ipfs/${IPTHUMB}'",
|
|
||||||
"ipfsroot": "'/ipfs/${IPFSREPFILEID}'",
|
"ipfsroot": "'/ipfs/${IPFSREPFILEID}'",
|
||||||
"file": "'${file}'",
|
"file": "'${file}'",
|
||||||
"ipfs": "'/ipfs/${IPFSREPFILEID}/${URLENCODE_FILE_NAME}'",
|
"ipfs": "'/ipfs/${IPFSREPFILEID}/${URLENCODE_FILE_NAME}'",
|
||||||
|
|
Loading…
Reference in New Issue