diff --git a/g1sms/functions.sh b/g1sms/functions.sh index 58bad79..88f92b4 100755 --- a/g1sms/functions.sh +++ b/g1sms/functions.sh @@ -271,12 +271,12 @@ log "__SUB:sms_INIT_ACCOUNT: ($1=phone, $2=NOSMS)" # GIVE NAME TO WALLET ####################### # 6 derniers chiffres du numéro de téléphone (login > 8 char) - TAIL=${PHONE:6:6} + TAIL=${PHONE:8:4} # No UIDNA yet. Create new - UIDNA=$(/home/$YOU/.zen/astroport/zen/tools/diceware.sh 1 | xargs) + UIDNA=N1$(/home/$YOU/.zen/astroport/zen/tools/diceware.sh 1 | xargs) # Check if already existing among all swarm wallets while [[ $(grep -Rwl "$UIDNA$TAIL" /home/$YOU/.zen/ipfs_swarm/.*/G1SMS/_uidna 2>/dev/null) ]]; do - UIDNA=$(/home/$YOU/.zen/astroport/zen/tools/diceware.sh 1 | xargs); done + UIDNA=N1$(/home/$YOU/.zen/astroport/zen/tools/diceware.sh 1 | xargs); done UIDNA="$UIDNA$TAIL" echo "$UIDNA" > "$UIDNAFILE" @@ -284,7 +284,7 @@ log "__SUB:sms_INIT_ACCOUNT: ($1=phone, $2=NOSMS)" # Create Account Files ####################### - PIN=$(/home/$YOU/.zen/astroport/zen/tools/diceware.sh | xargs) + PIN=$(/home/$YOU/.zen/astroport/zen/tools/diceware.sh 4 | xargs) python3 /home/$YOU/.zen/astroport/zen/tools/key_create_dunikey.py "$UIDNA" "$PIN" ## Copy PubSec file to /tmp/secret.dunikey mv /tmp/secret.dunikey /home/$YOU/.zen/g1sms/$PHONE/ @@ -362,6 +362,9 @@ log "__SUB:sms_INIT_ACCOUNT: ($1=phone, $2=NOSMS)" AMOUNTLOVE=$(bc <<< "$AMOUNTG1 * 100 / $DUFACTOR") case "$UNIT" in + ZEN) + AMOUNT=$(bc <<< "$AMOUNTG1 * 100" | cut -d ".") + ;; G1) AMOUNT=$AMOUNTG1 ;; @@ -400,6 +403,9 @@ AMOUNTDU=$(bc <<< "scale=2; $AMOUNTG1 / $DUFACTOR") AMOUNTLOVE=$(bc <<< "$AMOUNTG1 * 100 / $DUFACTOR") case "$UNIT" in + ZEN) + AMOUNT=$(bc <<< "scale=0; $AMOUNTG1 * 100" | cut -d ".") + ;; G1) AMOUNT=$AMOUNTG1 ;; @@ -422,6 +428,9 @@ echo ${aaa[@]} function make_accounting (){ # CONVERT AMOUNT UNIT to VIR G1 case "$UNIT" in +ZEN) + VIR=$(bc <<< "$AMOUNT / 100") + ;; G1) VIR=$AMOUNT; ;; diff --git a/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh b/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh index cea86ee..566aa85 100755 --- a/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh +++ b/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh @@ -34,7 +34,7 @@ echo $SONG # %EDlmG9QW2U2wYnvIIKf//GrDxYoQWGL/Jk3Nw0obi8M=.sha256 # http://golly.sourceforge.net/ mysearch="$ARTIST $SONG" -su $YOU -c mkdir -p /home/$YOU/.zen/music/${artist}/${song}/ +su $YOU -c mkdir -p /home/$YOU/.zen/audio/${ARTIST}/${SONG}/ su $YOU -c youtube-dl --default-search ytsearch1: --download-archive /home/$YOU/.ytdl.list --write-thumbnail --continue --no-overwrites --write-info-json --no-mtime --metadata-from-title "$artist - %(title)s" --embed-thumbnail --ignore-errors --audio-format mp3 --extract-audio -o "/home/$YOU/.zen/music/${artist}/${song}/%(id)s.%(title)s.%(uploader_id)s.%(ext)s" "$mysearch" >> /tmp/youtube-dl.log 2>&1 # Finaly this is made directly.... diff --git a/www/LOVELand/index.html b/www/LOVELand/index.html index c915a03..ed19722 100644 --- a/www/LOVELand/index.html +++ b/www/LOVELand/index.html @@ -82,7 +82,7 @@ g.type='text/javascript'; g.async=true; g.defer=true; g.src='https://piwik.p2p.l

Réunion de nos mondes...^3000 Ceux de nos savoir(s) être(s)^2000

Ensemble! l'Internet des gens EXISTE !^3000 !!!^3000

une [PLANETE] Heureu(x)se(s) ^3000un Futur PLUS Humain(s)

-

Découvrez Astroport^3000 programmé pour défendre votre liberté

+

Astroport^3000 est programmé pour défendre votre liberté

diff --git a/www/LOVELand/jukebox/REC/youtube-dl.php b/www/LOVELand/jukebox/REC/youtube-dl.php index 715be29..326041f 100644 --- a/www/LOVELand/jukebox/REC/youtube-dl.php +++ b/www/LOVELand/jukebox/REC/youtube-dl.php @@ -1,11 +1,12 @@ [REC]'; - zcopylink += ' *'; + var host = window.location.hostname; + var reclink = 'http://' + host + ':10010/_CopyLaRadio/youtube-dl.php?q=REC&artist=' + escape(encodeURIComponent(npinfo.Artist)) + '&title=' + escape(encodeURIComponent(npinfo.Title)) + '&radio='+ escape(encodeURIComponent(npinfo.Album)) +'&maxResults=1'; + var zcopylink = ' [REC]'; + zcopylink += ' *'; lines[0].text += zcopylink; // ZEEBOX HACK ZONE */ @@ -14,7 +15,7 @@ $search=$radio=$artist=$title=$lnk=$lnkform=$cmd=$len=""; $search = trim(urldecode($_REQUEST['q'])); $radio = urldecode($_REQUEST['radio']); -$artist = urldecode($_REQUEST['artist']); +$artist = urldecode($_REQUEST['artist']); $title = urldecode($_REQUEST['title']); $lnk = trim(urldecode($_REQUEST['lnk'])); $cmd="$radio|$artist|$title"; @@ -38,7 +39,7 @@ if( $search == "REC" ) { if( ! exec('grep '.escapeshellarg($lnk).' /tmp/ytdl.list') ) { // file_put_contents("/tmp/ytdl.list","CopyLibre||$lnk\n", FILE_APPEND); // instead of using a relay daemon to monitor a /tmp shared file, we are going to send sbot message to make it. #zenyta SSB message. - shell_exec('/var/www/loveland/_CopyLaRadio/sbotc_zenyta.sh'. $lnk); + shell_exec('/var/www/loveland/_CopyLaRadio/sbotc_zenyta.sh '. $lnk); } $result.='

LIEN: '.$lnk.'

'; diff --git a/zen/miam_miam.sh b/zen/miam_miam.sh index bf2dc4f..e9fc9e0 100755 --- a/zen/miam_miam.sh +++ b/zen/miam_miam.sh @@ -29,7 +29,7 @@ echo ' tstamp="$1" # for tstamp in $(ls ~/.zen/miam/); do - [[ $tstamp == "" ]] && echo "NO tstamp $tstamp" && exit 1 + [[ $tstamp == "" ]] && echo "MISSING tstamp $tstamp" && exit 1 [ ! -d ~/.zen/miam/$tstamp ] && echo "NOT FOUND ~/.zen/miam/$tstamp" && exit 1 [ -f ~/.zen/miam/$tstamp/msg_key ] && msg_key=$(cat ~/.zen/miam/$tstamp/msg_key) || echo "HEY I cannot find source SSB message in $tstamp" || exit 1 diff --git a/zen/ssb_GET_zenyta.sh b/zen/ssb_GET_zenyta.sh index c08393b..4f9fddd 100755 --- a/zen/ssb_GET_zenyta.sh +++ b/zen/ssb_GET_zenyta.sh @@ -65,9 +65,10 @@ do # SWARM REFRESH $MY_PATH/ipfs_SWARM_refresh.sh - # SWARM ALREADY DONE + # SWARM ALREADY DONE IT ?? + # IS LIKE "SELECT FROM ipfs_swarm WHERE _tag.zensource=$timestamp"(or something like that in SQL), means a ZenTag already exists. CHECKSWARM=$(grep -Rwl "$timestamp" ~/.zen/ipfs_swarm/.Qm*/TAG/*/_tag.zensource | tail -n 1 | cut -f 6 -d '/') - # OR SWARM PROCESS IN ACTION + # OR SWARM PROCESS IN ACTION (NB: copy tasks must be asynchronous in swarm) [[ ! $CHECKSWARM ]] && CHECKSWARM=$(grep -Rwl "$timestamp" ~/.zen/ipfs_swarm/.Qm*/TAG/process.timestamp.ssb | tail -n 1 | cut -f 6 -d '/') [[ $CHECKSWARM ]] \ && echo "$timestamp ALREADY on NODE $CHECKSWARM CONTINUE" \