Compare commits

...

2 Commits

2 changed files with 9 additions and 7 deletions

View File

@ -41,6 +41,8 @@ default 120x 90 Large Preview
define('YOUTUBE_THUMB', 'https://i.ytimg.com/vi/%s/mqdefault.jpg');
define ('MEDIAQR','https://'.$_SERVER['SERVER_NAME'].'/ipns/%s/QR.png');
// TODO : dynamic finding FRIENDS xzuid with "cat /home/$YOU/.zen/ipfs_swarm/.*/_xbian.zuid"
$stations = [
'virgo',
'onelove',

View File

@ -69,7 +69,7 @@ do
[[ -f ~/.zen/ipfs/.${IPFSNODEID}/KEY/${mediakey}/.timestamp ]] && TIMESTAMP=$(cat ~/.zen/ipfs/.${IPFSNODEID}/KEY/${mediakey}/.timestamp) # LAST REFRESH
timestamp=$(date -u +%s%N | cut -b1-13)
STAMPDIFF=$((timestamp - TIMESTAMP))
echo "Last Update : $(date -d @$TIMESTAMP)"
echo "Last Update : $(date -d @$TIMESTAMP | cut -b1-10)" # remove millisecond part
echo "${mediakey} LAST UPDATED $STAMPDIFF milliseconds AGO"
[ $STAMPDIFF -lt 21600000 ] && continue # 6h = 21600000 ms , 10h = 36000000 ms
@ -229,7 +229,7 @@ for ipnslink in $(ls ~/.zen/PIN/*/IPNSLINK 2>/dev/null | shuf ); do
[[ ! $TIMESTAMP ]] && TIMESTAMP=$(cat /tmp/${mediakey}/*/.timestamp 2>/dev/null | tail -n 1 ) # INITIAL TIMESTAMP
timestamp=$(date -u +%s%N | cut -b1-13)
STAMPDIFF=$((timestamp - TIMESTAMP))
echo "Last Update : $(date -d @$TIMESTAMP)"
echo "Last Update : $(date -d @$TIMESTAMP | cut -b1-10)" # remove millisecond part
echo "PIN WAS LAST UPDATED $STAMPDIFF milliseconds AGO"
[ $STAMPDIFF -lt 39600000 ] && continue # 11h = 39600000 ms / 12h = 43200000 ms