Now script can be run with "Open With" navigator plugin to copy while surfing
This commit is contained in:
parent
60572c7f02
commit
baf5498d21
|
@ -27,6 +27,12 @@ ME="${0##*/}"
|
|||
[[ $(which ffmpeg) == "" ]] && echo "ERREUR! Installez ffmpeg" && echo "sudo apt install ffmpeg" && exit 1
|
||||
[[ $(which xdpyinfo) == "" ]] && echo "ERREUR! Installez x11-utils" && echo "sudo apt install x11-utils" && exit 1
|
||||
|
||||
URL="$1"
|
||||
[ $URL ] && echo "URL: $URL" \
|
||||
&& IMPORT=$(zenity --entry --width 640 --title="$URL => Astroport" --text="Choisissez comment copier cette source" --entry-text="Page" Video MP3 WebSite) \
|
||||
&& [[ $IMPORT == "Video" ]] && IMPORT="Youtube" \
|
||||
&& CHOICE="$IMPORT"
|
||||
|
||||
# REMOVE GtkDialog errors for zenity
|
||||
shopt -s expand_aliases
|
||||
alias zenity='zenity 2> >(grep -v GtkDialog >&2)'
|
||||
|
@ -76,7 +82,7 @@ fi
|
|||
|
||||
########################################################################
|
||||
# CHOOSE CATEGORY (remove anime, not working!)
|
||||
CHOICE=$(zenity --entry --width 300 --title="Catégorie" --text="Choisissez la catégorie de votre vidéo" --entry-text="Film" Serie Video KODI Youtube MP3)
|
||||
[[ $CHOICE == "" ]] && CHOICE=$(zenity --entry --width 300 --title="Catégorie" --text="Choisissez la catégorie de votre media" --entry-text="Film" Serie Video Youtube MP3)
|
||||
[[ $CHOICE == "" ]] && exit 1
|
||||
|
||||
# LOWER CARACTERS
|
||||
|
@ -101,9 +107,10 @@ case ${CAT} in
|
|||
########################################################################
|
||||
youtube)
|
||||
|
||||
zenity --warning --width 600 --text 'DEVELOPPEMENT. SVP. Envoyez le LOG : https://git.p2p.legal .DEVELOPPEMENT'
|
||||
zenity --warning --width 600 --text 'DEVELOPPEMENT . ZONE . Please Participate https://git.p2p.legal'
|
||||
|
||||
YTURL=$(zenity --entry --width 300 --title "Lien ou identifiant à copier" --text "Indiquez le lien (URL) ou l'ID de la vidéo" --entry-text="")
|
||||
YTURL="$IMPORT"
|
||||
[[ $YTURL == "" ]] && YTURL=$(zenity --entry --width 300 --title "Lien ou identifiant à copier" --text "Indiquez le lien (URL) ou l'ID de la vidéo" --entry-text="")
|
||||
[[ $YTURL == "" ]] && exit 1
|
||||
|
||||
# Create TEMP directory to copy $YID_$TITLE.$FILE_EXT
|
||||
|
@ -126,9 +133,10 @@ JSON_FILE=$(echo ${FILE_NAME} | sed "s/${FILE_EXT}/json/g")
|
|||
YID=$(echo "${FILE_NAME}" | cut -d "&" -f 1)
|
||||
YNAME=$(echo "${FILE_NAME}" | cut -d "&" -f 2- | sed "s/[(][^)]*[)]//g" | sed -e 's/[^A-Za-z0-9._-]/_/g' | sed -e 's/__/_/g' ) # Remove YoutubeID_ and (what is in perentheses)
|
||||
[[ $(which detox) ]] && YNAME=$(echo "${FILE_NAME}" | cut -d "&" -f 2- | detox --inline)
|
||||
MEDIAID="${YID}"
|
||||
[[ $IMPORT != "" ]] && REVSOURCE="$(echo "$YTURL" | awk -F/ '{print $3}' | rev)_"
|
||||
MEDIAID="$REVSOURCE${YID}"
|
||||
TITLE="${YNAME%.*}"
|
||||
MEDIAKEY="YOUTUBE_${MEDIAID}"
|
||||
MEDIAKEY="YOUTUBE${MEDIAID}"
|
||||
## CORRECT PARAMETERS to Make Kodi compatible YASTRXBIAN FILE
|
||||
|
||||
GENRES=$(zenity --list --checklist --title="GENRE" --height=${haut} \
|
||||
|
@ -186,7 +194,7 @@ rm -Rf ${YTEMP}
|
|||
########################################################################
|
||||
mp3)
|
||||
|
||||
zenity --warning --width 600 --text 'DEVELOPPEMENT. SVP. Envoyez le LOG : https://git.p2p.legal .DEVELOPPEMENT'
|
||||
zenity --warning --width 600 --text 'DEVELOPPEMENT . ZONE . Please Participate https://git.p2p.legal'
|
||||
|
||||
# Create TEMP directory
|
||||
YTEMP="/tmp/$(date -u +%s%N | cut -b1-13)"
|
||||
|
@ -384,7 +392,7 @@ echo "${CAT};${MEDIAID};${YEAR};${TITLE};${SAISON};${GENRES};${GROUPES};${RES};/
|
|||
|
||||
video)
|
||||
|
||||
zenity --warning --width 600 --text 'DEVELOPPEMENT. SVP. Envoyez le LOG : https://git.p2p.legal .DEVELOPPEMENT'
|
||||
zenity --warning --width 600 --text 'DEVELOPPEMENT. SVP. Inscrivez-vous sur https://git.p2p.legal'
|
||||
|
||||
## GENERAL MEDIAKEY for uploaded video. Title + Decription + hashtag + hashipfs
|
||||
# SELECT FILE TO ADD TO ASTROPORT/KODI
|
||||
|
|
|
@ -260,6 +260,7 @@ rm /tmp/.ipfsid
|
|||
|
||||
########################################################################
|
||||
## ADD "ajouter_video.txt" and "video.json" will be SELF IPNS publish data
|
||||
## ENCRYPT TO STOP CLEAR DATA LEAKING
|
||||
[[ -f ~/astroport/${TYPE}/${REFERENCE}/ajouter_video.txt ]] && cp -f ~/astroport/${TYPE}/${REFERENCE}/ajouter_video.txt ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/
|
||||
[[ -f ~/astroport/${TYPE}/${REFERENCE}/video.json ]] && cp -f ~/astroport/${TYPE}/${REFERENCE}/video.json ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/
|
||||
########################################################################
|
||||
|
@ -268,7 +269,7 @@ rm /tmp/.ipfsid
|
|||
## EXPLANATIONS
|
||||
########################################################################
|
||||
# What is being in ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/
|
||||
# is published on http://127.0.0.1:8181/ipns/$KEY/
|
||||
# is published on http://127.0.0.1:8181/ipns/$KEY/ AND ipfs ls /ipns/$KEY/
|
||||
########################################################################
|
||||
########################################################################
|
||||
# CONTRACTS, are small App (fulljs or jquery + nginx backend app server)
|
||||
|
|
Loading…
Reference in New Issue