stop reversing lists, behave strange...
This commit is contained in:
parent
3f7ce6dbaf
commit
070bd8d2a9
|
@ -165,9 +165,9 @@ echo "##########################################################################
|
|||
# Add previous CHANNEL History
|
||||
[[ -f ~/.zen/bunkerbox/history.${CHANNEL}.json ]] && cp ~/.zen/bunkerbox/history.${CHANNEL}.json ~/.zen/bunkerbox/cache/$VUID/media/
|
||||
|
||||
# Add current/latest reversed history to media
|
||||
# Add current/latest history to media
|
||||
echo '{ "Videos":' > ~/.zen/bunkerbox/cache/$VUID/media/history.json
|
||||
cat ~/.zen/bunkerbox/history.json | jq '.[] | reverse' >> ~/.zen/bunkerbox/cache/$VUID/media/history.json
|
||||
cat ~/.zen/bunkerbox/history.json | jq '.[]' >> ~/.zen/bunkerbox/cache/$VUID/media/history.json
|
||||
echo '}' >> ~/.zen/bunkerbox/cache/$VUID/media/history.json
|
||||
|
||||
# COPY videojs.html TEMPLATE & Updating links
|
||||
|
@ -223,7 +223,7 @@ echo "##########################################################################
|
|||
# cat ~/.zen/bunkerbox/cache/$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"
|
||||
[[ "$(cat ~/.zen/bunkerbox/cache/$VUID/media/history.json)" == "" ]] && echo "NO $VUID/media/history.json FATAL ERROR" && exit 1
|
||||
# Upgrade local history.json with reverse new one
|
||||
# Upgrade local history.json with new one
|
||||
if [[ -f ~/.zen/bunkerbox/cache/$VUID/media/history.json ]]; then
|
||||
echo '{ "Videos":' > ~/.zen/bunkerbox/history.json
|
||||
cat ~/.zen/bunkerbox/cache/$VUID/media/history.json | jq '.[]' >> ~/.zen/bunkerbox/history.json
|
||||
|
|
Loading…
Reference in New Issue