forked from qo-op/bunkerbox
EXPLAIN A LITTLE
This commit is contained in:
parent
b66568739a
commit
3c31995839
|
@ -164,7 +164,7 @@ echo "##########################################################################
|
|||
# IPFS WRITING DONE. Doing after is to UPDATE local history(s).json in ~/.zen/bunkerbox/
|
||||
# Then publishing on IPNS 'qo-op' all dynamic data needed by above 'index.html'
|
||||
#################################################################
|
||||
|
||||
#################
|
||||
# Take care about CHANNEL history
|
||||
echo "++ MANAGE $CHANNEL HISTORY"
|
||||
[[ ! -f ~/.zen/bunkerbox/history.${CHANNEL}.json || $(cat ~/.zen/bunkerbox/history.${CHANNEL}.json 2>/dev/null) == "" ]] && cp ${MY_PATH}/templates/data/history.json ~/.zen/bunkerbox/history.${CHANNEL}.json
|
||||
|
@ -181,12 +181,7 @@ echo "##########################################################################
|
|||
cp ~/.zen/bunkerbox/$VUID/media/history.${CHANNEL}.json ~/.zen/bunkerbox/history.${CHANNEL}.json
|
||||
fi
|
||||
|
||||
|
||||
VMAIN="/ipfs/$IPFSROOT/$VUID.m3u8"
|
||||
# UPDATING original JSON - TODO inform crowdbunker that IPFS copy is available.
|
||||
cat ~/.zen/bunkerbox/$VUID/media/$VUID.json | jq ".video.hlsManifest.url = \"$VMAIN\"" > ~/.zen/bunkerbox/$VUID/$VUID.json
|
||||
echo "TODO: CALL BACK SOURCE ... New HLS = $IPFSNGW$VMAIN"
|
||||
|
||||
#################
|
||||
## UPDATE GLOCAL HISTORY ?
|
||||
IsThere=$(cat ~/.zen/bunkerbox/history.json | jq .Videos[].link | grep $VUID)
|
||||
if [[ ! $IsThere ]]; then
|
||||
|
@ -210,11 +205,19 @@ echo "##########################################################################
|
|||
fi
|
||||
fi
|
||||
|
||||
# Create local index.html redirecting to current latest IPFS video
|
||||
#################
|
||||
VMAIN="/ipfs/$IPFSROOT/$VUID.m3u8"
|
||||
# UPDATING original JSON - TODO inform crowdbunker that IPFS copy is available.
|
||||
cat ~/.zen/bunkerbox/$VUID/media/$VUID.json | jq ".video.hlsManifest.url = \"$VMAIN\"" > ~/.zen/bunkerbox/$VUID/$VUID.json
|
||||
echo "TODO: CALL BACK SOURCE ... New HLS = $IPFSNGW$VMAIN"
|
||||
|
||||
#################
|
||||
# Create local index.html simple redirect to current IPFS video
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0;URL=$IPFSNGW$INDEX\">" > ~/.zen/bunkerbox/index.html
|
||||
echo "===== INDEX ===== $IPFSNGW/ipfs/$IPFSROOT"
|
||||
echo "HISTORY : $IPFSNGW/ipfs/$IPFSROOT/history.json"
|
||||
|
||||
################# ################# #################
|
||||
PS3="Comment voulez-vous publier votre collecte ? "
|
||||
choices=("debug" "local" "qo-op" "astrXbian")
|
||||
fav=$(cat ~/.zen/bunkerbox/choice 2>/dev/null)
|
||||
|
@ -277,7 +280,7 @@ echo "##########################################################################
|
|||
echo
|
||||
echo "Chaine Vidéo 'qo-op' => $IPFSNGW/ipns/$IPNS"
|
||||
echo
|
||||
|
||||
##### NEW HOMEPAGE / NEW DYNAMIC DATA ###### HERE TIMESTAMPING IS OK
|
||||
InHere=$(cat ~/.zen/bunkerbox/history.qo-op.json | jq .Videos[].link | grep $VUID)
|
||||
if [[ ! $InHere ]]; then
|
||||
echo "BunkerBOX - NOUVELLE VIDEO - Mise à jour homepage & dynamic history(s).json"
|
||||
|
|
Loading…
Reference in New Issue