forked from qo-op/bunkerbox
the best always comes
This commit is contained in:
parent
42739ab8ca
commit
3db9b35073
|
@ -36,47 +36,48 @@ cat ~/.zen/bunkerbox/crowd.json | jq -r '.posts | .[] | .video.id' > /tmp/vuid.l
|
||||||
# Reverse list to start with older videos
|
# Reverse list to start with older videos
|
||||||
for VUID in $(tac /tmp/vuid.list); do
|
for VUID in $(tac /tmp/vuid.list); do
|
||||||
[[ "$VUID" == "null" ]] && echo "MESSAGE... Bypassing..." && echo && continue
|
[[ "$VUID" == "null" ]] && echo "MESSAGE... Bypassing..." && echo && continue
|
||||||
|
echo "====================================================="
|
||||||
echo "Bunker BOX : Adding $VUID"
|
echo "Bunker BOX : Adding $VUID"
|
||||||
mkdir -p ~/.zen/bunkerbox/$VUID/media
|
mkdir -p ~/.zen/bunkerbox/$VUID/media
|
||||||
|
|
||||||
URL="https://api.crowdbunker.com/post/$VUID/details"
|
URL="https://api.crowdbunker.com/post/$VUID/details"
|
||||||
# echo "WISHING TO EXPLORE $URL ?"; read TEST; [[ "$TEST" != "" ]] && echo && continue
|
# echo "WISHING TO EXPLORE $URL ?"; read TEST; [[ "$TEST" != "" ]] && echo && continue
|
||||||
curl -s $URL -H "Accept: application/json" -o ~/.zen/bunkerbox/$VUID/$VUID.json
|
curl -s $URL -H "Accept: application/json" -o ~/.zen/bunkerbox/$VUID/media/$VUID.json
|
||||||
|
|
||||||
# STREAMING LIVE ?
|
# STREAMING LIVE ?
|
||||||
echo ">>> Extracting video caracteristics from ~/.zen/bunkerbox/$VUID/$VUID.json"
|
echo ">>> Extracting video caracteristics from ~/.zen/bunkerbox/$VUID/media/$VUID.json"
|
||||||
ISLIVE=$(cat ~/.zen/bunkerbox/$VUID/$VUID.json | jq -r .video.isLiveType)&& [[ "$ISLIVE" == "true" ]] && echo "LIVE... "
|
ISLIVE=$(cat ~/.zen/bunkerbox/$VUID/media/$VUID.json | jq -r .video.isLiveType)&& [[ "$ISLIVE" == "true" ]] && echo "LIVE... "
|
||||||
LIVE=$(cat ~/.zen/bunkerbox/$VUID/$VUID.json | jq -r .video.isLiveActive) && [[ "$LIVE" == "true" ]] && echo "STREAMING... Bypassing..." && echo && continue
|
LIVE=$(cat ~/.zen/bunkerbox/$VUID/media/$VUID.json | jq -r .video.isLiveActive) && [[ "$LIVE" == "true" ]] && echo "STREAMING... Bypassing..." && echo && continue
|
||||||
DURATION=$(cat ~/.zen/bunkerbox/$VUID/$VUID.json | jq -r .video.duration) && [[ $DURATION == 0 ]] && echo "NOT STARTED YET" && echo && continue
|
DURATION=$(cat ~/.zen/bunkerbox/$VUID/media/$VUID.json | jq -r .video.duration) && [[ $DURATION == 0 ]] && echo "NOT STARTED YET" && echo && continue
|
||||||
TITLE=$(cat ~/.zen/bunkerbox/$VUID/$VUID.json | jq -r .video.title | sed "s/'/ /g" | sed 's/"/ /g') # Remove quote
|
TITLE=$(cat ~/.zen/bunkerbox/$VUID/media/$VUID.json | jq -r .video.title | sed "s/'/ /g" | sed 's/"/ /g') # Remove quote
|
||||||
CHANNEL=$(cat ~/.zen/bunkerbox/$VUID/$VUID.json | jq -r .channel.name)
|
CHANNEL=$(cat ~/.zen/bunkerbox/$VUID/media/$VUID.json | jq -r .channel.name)
|
||||||
ORGUID=$(cat ~/.zen/bunkerbox/$VUID/$VUID.json | jq -r .organization.uid)
|
ORGUID=$(cat ~/.zen/bunkerbox/$VUID/media/$VUID.json | jq -r .organization.uid)
|
||||||
ORGNAME=$(cat ~/.zen/bunkerbox/$VUID/$VUID.json | jq -r .organization.name)
|
ORGNAME=$(cat ~/.zen/bunkerbox/$VUID/media/$VUID.json | jq -r .organization.name)
|
||||||
ORGBANNER=$(cat ~/.zen/bunkerbox/$VUID/$VUID.json | jq -r .organization.banner.url)
|
ORGBANNER=$(cat ~/.zen/bunkerbox/$VUID/media/$VUID.json | jq -r .organization.banner.url)
|
||||||
|
|
||||||
HLS=$(cat ~/.zen/bunkerbox/$VUID/$VUID.json | jq -r .video.hlsManifest.url)
|
HLS=$(cat ~/.zen/bunkerbox/$VUID/media/$VUID.json | jq -r .video.hlsManifest.url)
|
||||||
MEDIASOURCE=$(echo $HLS | rev | cut -d '/' -f 2- | rev)
|
MEDIASOURCE=$(echo $HLS | rev | cut -d '/' -f 2- | rev)
|
||||||
echo "$TITLE ($DURATION s)"
|
echo "$TITLE ($DURATION s)"
|
||||||
|
|
||||||
## NO choice made, so ask to continue each loop
|
## NO choice made, so ask to continue each loop
|
||||||
[[ ! $(cat ~/.zen/bunkerbox/choice 2>/dev/null) ]] && echo "READY TO PROCESS ? ENTER. Any character sent means next." && read TEST && [[ "$TEST" != "" ]] && echo && continue ## NO CHOICE MADE
|
[[ ! $(cat ~/.zen/bunkerbox/choice 2>/dev/null) ]] && echo "READY TO PROCESS ? ENTER. Any character sent means next." && read TEST && [[ "$TEST" != "" ]] && echo && continue ## NO CHOICE MADE
|
||||||
|
|
||||||
start=`date +%s`
|
|
||||||
echo "$HLS"
|
echo "$HLS"
|
||||||
## Download HLS source m3u8 (contains video & audio)
|
## Download HLS source m3u8 (contains video & audio)
|
||||||
curl -s $HLS -o ~/.zen/bunkerbox/$VUID/$VUID.m3u8
|
curl -s $HLS -o ~/.zen/bunkerbox/$VUID/$VUID.m3u8
|
||||||
[[ ! $(cat ~/.zen/bunkerbox/choice 2>/dev/null) ]] && cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 # DEBUG
|
[[ ! $(cat ~/.zen/bunkerbox/choice 2>/dev/null) ]] && cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 # DEBUG
|
||||||
|
|
||||||
echo ">>>>>>>>>>>>>>>> Downloading VIDEO"
|
echo ">>>>>>>>>>>>>>>> Downloading VIDEO"
|
||||||
# Choose 360p or 480p or 240p
|
# Choose 360p or 480p or 720p or 240p
|
||||||
VSIZE=360 && VIDEOHEAD=$(cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 | grep -B1 ${VSIZE}p | head -n 1) && VIDEOSRC=$(cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 | grep ${VSIZE}p | tail -n 1 | cut -f 1 -d '.')
|
VSIZE=360 && VIDEOHEAD=$(cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 | grep -B1 ${VSIZE}p | head -n 1) && VIDEOSRC=$(cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 | grep ${VSIZE}p | tail -n 1 | cut -f 1 -d '.')
|
||||||
[[ "$VIDEOSRC" == "" ]] && VSIZE=480 && VIDEOHEAD=$(cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 | grep -B1 ${VSIZE}p | head -n 1) && VIDEOSRC=$(cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 | grep ${VSIZE}p | tail -n 1 | cut -f 1 -d '.')
|
[[ "$VIDEOSRC" == "" ]] && VSIZE=480 && VIDEOHEAD=$(cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 | grep -B1 ${VSIZE}p | head -n 1) && VIDEOSRC=$(cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 | grep ${VSIZE}p | tail -n 1 | cut -f 1 -d '.')
|
||||||
|
[[ "$VIDEOSRC" == "" ]] && VSIZE=720 && VIDEOHEAD=$(cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 | grep -B1 ${VSIZE}p | head -n 1) && VIDEOSRC=$(cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 | grep ${VSIZE}p | tail -n 1 | cut -f 1 -d '.')
|
||||||
[[ "$VIDEOSRC" == "" ]] && VSIZE=240 &&VIDEOHEAD=$(cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 | grep -B1 ${VSIZE}p | head -n 1) && VIDEOSRC=$(cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 | grep ${VSIZE}p | tail -n 1 | cut -f 1 -d '.')
|
[[ "$VIDEOSRC" == "" ]] && VSIZE=240 &&VIDEOHEAD=$(cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 | grep -B1 ${VSIZE}p | head -n 1) && VIDEOSRC=$(cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 | grep ${VSIZE}p | tail -n 1 | cut -f 1 -d '.')
|
||||||
## NO VIDEO ?
|
## NO VIDEO ?
|
||||||
[[ "$VIDEOSRC" == "" ]] && echo "NO COMPATIBLE RESOLUTION VIDEO FOUND." && cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 && continue
|
[[ "$VIDEOSRC" == "" ]] && echo "NO COMPATIBLE RESOLUTION VIDEO FOUND." && cat ~/.zen/bunkerbox/$VUID/$VUID.m3u8 && continue
|
||||||
|
|
||||||
# THUMBNAIL
|
# THUMBNAIL
|
||||||
VTHUMB="$(cat ~/.zen/bunkerbox/$VUID/$VUID.json | jq -r --arg VSIZE "$VSIZE" '.video.thumbnails[] | select(.height == $VSIZE) | .url')"
|
VTHUMB="$(cat ~/.zen/bunkerbox/$VUID/media/$VUID.json | jq -r --arg VSIZE "$VSIZE" '.video.thumbnails[] | select(.height == $VSIZE) | .url')"
|
||||||
echo ">>>>>>>>>>>>>>>> Downloading $VSIZE Thumbnail"
|
echo ">>>>>>>>>>>>>>>> Downloading $VSIZE Thumbnail"
|
||||||
[[ ! -f ~/.zen/bunkerbox/$VUID/media/$VUID.jpg ]] && curl -s $VTHUMB -o ~/.zen/bunkerbox/$VUID/media/$VUID.jpg
|
[[ ! -f ~/.zen/bunkerbox/$VUID/media/$VUID.jpg ]] && curl -s $VTHUMB -o ~/.zen/bunkerbox/$VUID/media/$VUID.jpg
|
||||||
[[ ! -f ~/.zen/bunkerbox/$VUID/media/$VUID.jpg ]] && cp ${MY_PATH}/images/astroport.jpg ~/.zen/bunkerbox/$VUID/media/$VUID.jpg # CORRECT MISSING THUMB
|
[[ ! -f ~/.zen/bunkerbox/$VUID/media/$VUID.jpg ]] && cp ${MY_PATH}/images/astroport.jpg ~/.zen/bunkerbox/$VUID/media/$VUID.jpg # CORRECT MISSING THUMB
|
||||||
|
@ -110,7 +111,7 @@ ls ~/.zen/bunkerbox/$VUID/media/ # SHOW ALL COLLECTED MEDIA
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
start=`date +%s`
|
||||||
echo "##########################################################################"
|
echo "##########################################################################"
|
||||||
echo ">>>>>>>>>>>>>>>> ADDING index.html"
|
echo ">>>>>>>>>>>>>>>> ADDING index.html"
|
||||||
# COPY index, style, js AND data
|
# COPY index, style, js AND data
|
||||||
|
@ -119,31 +120,30 @@ echo "##########################################################################
|
||||||
cp ${MY_PATH}/templates/videojs.html ~/.zen/bunkerbox/$VUID/media/index.html
|
cp ${MY_PATH}/templates/videojs.html ~/.zen/bunkerbox/$VUID/media/index.html
|
||||||
cp ${MY_PATH}/images/astroport.jpg ~/.zen/bunkerbox/$VUID/media/
|
cp ${MY_PATH}/images/astroport.jpg ~/.zen/bunkerbox/$VUID/media/
|
||||||
|
|
||||||
## NO HISTORY? COPY from TEMPLATE (PROGRAM START)
|
## NO OR EMPTY HISTORY? COPY from TEMPLATE (PROGRAM START)
|
||||||
[[ ! -f ~/.zen/bunkerbox/history.json ]] && cp ${MY_PATH}/templates/data/history.json ~/.zen/bunkerbox/history.json
|
[[ ! -f ~/.zen/bunkerbox/history.json || $(cat ~/.zen/bunkerbox/history.json 2>/dev/null) == "" ]] && cp ${MY_PATH}/templates/data/history.json ~/.zen/bunkerbox/history.json
|
||||||
|
|
||||||
# qo-op get latest history.json
|
# qo-op get latest history.json
|
||||||
if [[ "$(cat ~/.zen/bunkerbox/choice 2>/dev/null)"=="qo-op" ]]; then
|
if [[ "$(cat ~/.zen/bunkerbox/choice 2>/dev/null)" == "qo-op" ]]; then
|
||||||
IPNSL="/ipns/$(cat ~/.zen/bunkerbox/qo-op)"
|
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
|
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
|
[[ $(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
|
# JSON FUSION
|
||||||
jq -s '.[0] * .[1]' ~/.zen/bunkerbox/history.json ~/.zen/bunkerbox/history.qo-op.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
|
mv ~/.zen/bunkerbox/history.fusion.json ~/.zen/bunkerbox/history.json ## REPLACE LOCAL HISTORY CACHE
|
||||||
else
|
else
|
||||||
IPNSL="./"
|
IPNSL="./"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add current/latest reversed history to media
|
# Add current/latest reversed history to media
|
||||||
echo '{
|
echo '{ "Videos":' > ~/.zen/bunkerbox/$VUID/media/history.json
|
||||||
"Videos":' > ~/.zen/bunkerbox/$VUID/media/history.json
|
|
||||||
cat ~/.zen/bunkerbox/history.json | jq '.[] | reverse' >> ~/.zen/bunkerbox/$VUID/media/history.json
|
cat ~/.zen/bunkerbox/history.json | jq '.[] | reverse' >> ~/.zen/bunkerbox/$VUID/media/history.json
|
||||||
echo '}' >> ~/.zen/bunkerbox/$VUID/media/history.json
|
echo '}' >> ~/.zen/bunkerbox/$VUID/media/history.json
|
||||||
|
|
||||||
# Using relative links
|
# COPY videojs.html TEMPLATE & Updating links
|
||||||
sed "s/_IPFSROOT_/./g" ${MY_PATH}/templates/videojs.html > ~/.zen/bunkerbox/$VUID/media/index.html
|
sed "s/_IPFSROOT_/./g" ${MY_PATH}/templates/videojs.html > ~/.zen/bunkerbox/$VUID/media/index.html
|
||||||
sed -i "s/_VUID_/$VUID/g" ~/.zen/bunkerbox/$VUID/media/index.html
|
sed -i "s/_VUID_/$VUID/g" ~/.zen/bunkerbox/$VUID/media/index.html
|
||||||
# sed -i s/_DATE_/$(date -u "+%Y-%m-%d#%H:%M:%S")/g ~/.zen/bunkerbox/$VUID/media/index.html # Different Copy Makes Different Chains !
|
# sed -i s/_DATE_/$(date -u "+%Y-%m-%d#%H:%M:%S")/g ~/.zen/bunkerbox/$VUID/media/index.html # !! Different Copy Makes Different Chains !
|
||||||
sed -i "s~_TITLE_~$TITLE~g" ~/.zen/bunkerbox/$VUID/media/index.html
|
sed -i "s~_TITLE_~$TITLE~g" ~/.zen/bunkerbox/$VUID/media/index.html
|
||||||
sed -i "s~_CHANNEL_~$CHANNEL~g" ~/.zen/bunkerbox/$VUID/media/index.html
|
sed -i "s~_CHANNEL_~$CHANNEL~g" ~/.zen/bunkerbox/$VUID/media/index.html
|
||||||
sed -i "s~_IPNSL_~$IPNSL~g" ~/.zen/bunkerbox/$VUID/media/index.html #MAJ IPNS link
|
sed -i "s~_IPNSL_~$IPNSL~g" ~/.zen/bunkerbox/$VUID/media/index.html #MAJ IPNS link
|
||||||
|
@ -155,29 +155,27 @@ echo "##########################################################################
|
||||||
|
|
||||||
VMAIN="/ipfs/$IPFSROOT/$VUID.m3u8"
|
VMAIN="/ipfs/$IPFSROOT/$VUID.m3u8"
|
||||||
# UPDATING original JSON - TODO inform crowdbunker that IPFS copy is available.
|
# UPDATING original JSON - TODO inform crowdbunker that IPFS copy is available.
|
||||||
cat ~/.zen/bunkerbox/$VUID/$VUID.json | jq ".video.hlsManifest.url = \"$VMAIN\"" > ~/.zen/bunkerbox/$VUID/media/$VUID.json
|
cat ~/.zen/bunkerbox/$VUID/media/$VUID.json | jq ".video.hlsManifest.url = \"$VMAIN\"" > ~/.zen/bunkerbox/$VUID/$VUID.json
|
||||||
echo "M3U8 : $IPFSNGW$VMAIN"
|
echo "TODO: CALL BACK SOURCE ... New HLS = $IPFSNGW$VMAIN"
|
||||||
|
|
||||||
## UPDATE GLOCAL HISTORY ?
|
## UPDATE GLOCAL HISTORY ?
|
||||||
IsThere=$(cat ~/.zen/bunkerbox/history.json | jq .Videos[].link | grep $VUID)
|
IsThere=$(cat ~/.zen/bunkerbox/history.json | jq .Videos[].link | grep $VUID)
|
||||||
if [[ ! $IsThere ]]; then
|
if [[ ! $IsThere ]]; then
|
||||||
echo "Add $INDEX to ~/.zen/bunkerbox/$VUID/media/history.json"
|
echo "Add $INDEX to ~/.zen/bunkerbox/$VUID/media/history.json"
|
||||||
## history.json Videos.link is the HTML code displayed in index.html with pagination.js (related to)
|
## history.json Videos.link is the HTML code displayed in index.html with pagination.js (related to)
|
||||||
cat ~/.zen/bunkerbox/history.json | jq '.Videos += [{"link": "<a href='"'_INDEX_'"'><img src='"'_INDEX_/_VUID_.jpg'"' height=80 ></a><br>'"'_TITLE_'"'"}]' > ~/.zen/bunkerbox/$VUID/media/history.json
|
cat ~/.zen/bunkerbox/history.json | jq '.Videos += [{"link": "<a id='"'_TSVUID_'"' href='"'_INDEX_'"'><img src='"'_INDEX_/_VUID_.jpg'"' height=80 ></a><br>'"'_TITLE_'"'"}]' > ~/.zen/bunkerbox/$VUID/media/history.json
|
||||||
echo $INDEX
|
# sed -i "s~_TSVUID_~$TS$VUID~g" ~/.zen/bunkerbox/$VUID/media/history.json # Makes different chain for each creator !!
|
||||||
sed -i "s~_INDEX_~$INDEX~g" ~/.zen/bunkerbox/$VUID/media/history.json
|
sed -i "s~_INDEX_~$INDEX~g" ~/.zen/bunkerbox/$VUID/media/history.json
|
||||||
echo $VUID
|
|
||||||
sed -i "s~_VUID_~$VUID~g" ~/.zen/bunkerbox/$VUID/media/history.json
|
sed -i "s~_VUID_~$VUID~g" ~/.zen/bunkerbox/$VUID/media/history.json
|
||||||
echo $TITLE
|
|
||||||
sed -i "s~_TITLE_~$TITLE~g" ~/.zen/bunkerbox/$VUID/media/history.json
|
sed -i "s~_TITLE_~$TITLE~g" ~/.zen/bunkerbox/$VUID/media/history.json
|
||||||
|
|
||||||
# COULD BE DONE LIKE THAT
|
# COULD BE DONE LIKE THAT
|
||||||
# cat ~/.zen/bunkerbox/$VUID/media/history.json | jq --arg INDEX "$INDEX" --arg TITLE "$TITLE" '.Videos += [{"link": "<a href='''$INDEX''' >'''$TITLE'''</a>"}]' > ~/.zen/bunkerbox/history.json
|
# cat ~/.zen/bunkerbox/$VUID/media/history.json | jq --arg INDEX "$INDEX" --arg TITLE "$TITLE" '.Videos += [{"link": "<a href='''$INDEX''' >'''$TITLE'''</a>"}]' > ~/.zen/bunkerbox/history.json
|
||||||
echo "MISE A JOUR ~/.zen/bunkerbox/history.json"
|
echo "MISE A JOUR ~/.zen/bunkerbox/history.json"
|
||||||
[[ "$(cat ~/.zen/bunkerbox/$VUID/media/history.json)" == "" ]] && echo "FATAL ERROR" && exit 1
|
[[ "$(cat ~/.zen/bunkerbox/$VUID/media/history.json)" == "" ]] && echo "FATAL ERROR" && exit 1
|
||||||
# Upgrade local history.json with reverse current one
|
# Upgrade local history.json with reverse new one
|
||||||
if [[ -f ~/.zen/bunkerbox/$VUID/media/history.json ]]; then
|
if [[ -f ~/.zen/bunkerbox/$VUID/media/history.json ]]; then
|
||||||
echo '{
|
echo '{ "Videos":' > ~/.zen/bunkerbox/history.json
|
||||||
"Videos":' > ~/.zen/bunkerbox/history.json
|
|
||||||
cat ~/.zen/bunkerbox/$VUID/media/history.json | jq '.[] | reverse' >> ~/.zen/bunkerbox/history.json
|
cat ~/.zen/bunkerbox/$VUID/media/history.json | jq '.[] | reverse' >> ~/.zen/bunkerbox/history.json
|
||||||
echo '}' >> ~/.zen/bunkerbox/history.json
|
echo '}' >> ~/.zen/bunkerbox/history.json
|
||||||
fi
|
fi
|
||||||
|
@ -277,14 +275,10 @@ echo "##########################################################################
|
||||||
"debug")
|
"debug")
|
||||||
echo "debug"
|
echo "debug"
|
||||||
> ~/.zen/bunkerbox/choice
|
> ~/.zen/bunkerbox/choice
|
||||||
break
|
continue
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
end=`date +%s`; echo ___Duration `expr $end - $start` seconds___
|
||||||
##########################################################################
|
|
||||||
# cat ~/.zen/bunkerbox/$VUID/media/$VUID.json | jq -r .video.hlsManifest.url
|
|
||||||
|
|
||||||
end=`date +%s`; echo Duration `expr $end - $start` seconds.
|
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
|
@ -45,9 +45,11 @@
|
||||||
<div id="videosList"><div class="wrapper"></div></div>
|
<div id="videosList"><div class="wrapper"></div></div>
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
|
<center>
|
||||||
<h6>
|
<h6>
|
||||||
<a href="_IPNSL_"> _\/_ </a> powered by <a href="https://astroport.com"><span>"</span>Astroport<span>"</span></a>
|
<a href="_IPNSL_"> _\/_ </a> powered by <a href="https://astroport.com"><span>"</span>Astroport<span>"</span></a>
|
||||||
</h6>
|
</h6>
|
||||||
|
</center>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
@ -64,14 +66,14 @@ var player = videojs('vbunk', {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$.getJSON('./history.json', function (json) {
|
$.getJSON('_IPNSL_/history.json', function (json) {
|
||||||
$('#videosList').pagination({
|
$('#videosList').pagination({
|
||||||
dataSource: json.Videos,
|
dataSource: json.Videos,
|
||||||
pageSize: 1,
|
pageSize: 1,
|
||||||
callback: function(data, pagination) {
|
callback: function(data, pagination) {
|
||||||
var wrapper = $('#videosList .wrapper').empty();
|
var wrapper = $('#videosList .wrapper').empty();
|
||||||
$.each(data, function (i, f) {
|
$.each(data, function (i, f) {
|
||||||
$('#videosList .wrapper').append('<ul><li>' + f.link + '</li></ul>');
|
$('#videosList .wrapper').append('<ul><li>div class="snippet-block">' + f.link + '</div></li></ul>');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue