forked from qo-op/bunkerbox
history_qo-op.json
This commit is contained in:
parent
ec950f4da6
commit
6d0b0adcaf
|
@ -127,10 +127,10 @@ echo "##########################################################################
|
|||
# qo-op get latest history.json
|
||||
if [[ "$(cat ~/.zen/bunkerbox/choice 2>/dev/null)" == "qo-op" ]]; then
|
||||
IPNSL="/ipns/$(cat ~/.zen/bunkerbox/qo-op)"
|
||||
ipfs get -o ~/.zen/bunkerbox/history.qo-op.json $IPNSL/history.json # Get actual IPNS qo-op history.json
|
||||
[[ $(cat ~/.zen/bunkerbox/history.qo-op.json | jq .Videos[].link | grep $VUID) ]] && echo "VIDEO DEJA DANS IPFS... CONTINUE" && echo && cp ~/.zen/bunkerbox/history.qo-op.json ~/.zen/bunkerbox/history.json && continue
|
||||
ipfs get -o ~/.zen/bunkerbox/history_qo-op.json $IPNSL/history.json # Get actual IPNS qo-op history.json
|
||||
[[ $(cat ~/.zen/bunkerbox/history_qo-op.json | jq .Videos[].link | grep $VUID) ]] && echo "VIDEO DEJA DANS IPFS... CONTINUE" && echo && cp ~/.zen/bunkerbox/history_qo-op.json ~/.zen/bunkerbox/history.json && continue
|
||||
# JSON FUSION
|
||||
jq -s '.[0] * .[1]' ~/.zen/bunkerbox/history.qo-op.json ~/.zen/bunkerbox/history.json | jq -M '.Videos |= unique_by(.link)' > ~/.zen/bunkerbox/history.fusion.json
|
||||
jq -s '.[0] * .[1]' ~/.zen/bunkerbox/history_qo-op.json ~/.zen/bunkerbox/history.json | jq -M '.Videos |= unique_by(.link)' > ~/.zen/bunkerbox/history.fusion.json
|
||||
mv ~/.zen/bunkerbox/history.fusion.json ~/.zen/bunkerbox/history.json ## REPLACE LOCAL HISTORY CACHE
|
||||
else
|
||||
IPNSL="./"
|
||||
|
@ -281,7 +281,7 @@ 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)
|
||||
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"
|
||||
mkdir -p ~/.zen/bunkerbox/homepage/
|
||||
|
|
Loading…
Reference in New Issue