diff --git a/ajouter_video.sh b/ajouter_video.sh index 9368de4..09d1001 100755 --- a/ajouter_video.sh +++ b/ajouter_video.sh @@ -146,7 +146,7 @@ if [[ ! -f /usr/local/bin/youtube-dl ]]; then sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl sudo chmod a+rx /usr/local/bin/youtube-dl fi -/usr/local/bin/youtube-dl -f '[height=720]/best' \ +/usr/local/bin/youtube-dl -f '[height=360]/best' \ --no-playlist --write-info-json --write-annotations --write-auto-subs --sub-lang "*" \ --no-mtime -o "${YTEMP}/%(id)s&%(title)s.%(ext)s" $YTURL diff --git a/install.sh b/install.sh index 8f2775e..ac803bb 100755 --- a/install.sh +++ b/install.sh @@ -21,7 +21,7 @@ for i in git fail2ban inotify-tools curl net-tools libsodium* python3-dev python done #sudo apt-get install build-essential qrencode jq bc gawk ffmpeg sqlite dnsutils v4l-utils vlc mp3info musl-dev openssl* cargo detox httrack html2text ssmtp sudo -y -for i in build-essential qrencode jq bc gawk yt-dlp ffmpeg sqlite dnsutils v4l-utils vlc mp3info musl-dev openssl* cargo detox nmap httrack html2text ssmtp imagemagick ttf-mscorefonts-installer libcurl4-openssl-dev; do +for i in build-essential qrencode jq bc file gawk yt-dlp ffmpeg sqlite dnsutils v4l-utils vlc mp3info musl-dev openssl* cargo detox nmap httrack html2text ssmtp imagemagick ttf-mscorefonts-installer libcurl4-openssl-dev; do if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then sudo apt install -y $i fi diff --git a/zen/new_file_in_astroport.sh b/zen/new_file_in_astroport.sh index bf5d62a..53313d7 100755 --- a/zen/new_file_in_astroport.sh +++ b/zen/new_file_in_astroport.sh @@ -369,10 +369,10 @@ IPNS=$(ipfs name publish --quieter --key="${MEDIAKEY}" $NEWIPFS) ######################################################################## # film/serie PUBLISH "ajouter_video.txt" for KODI ######################################################################## -if [[ "${CAT}" =~ ^(film|serie|youtube|page)$ ]] +if [[ "${CAT}" =~ ^(film|serie|youtube|page|video)$ ]] then ## CREATE GCHANGE AD - if [[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/.gchange.ad && "${CAT}" != "youtube" && "${CAT}" != "page" ]] + if [[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/.gchange.ad && ( "${CAT}" == "film" || "${CAT}" == "serie") ]] then GOFFER=$(~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" setoffer -t "${TITLE} #astroport #${MEDIAKEY}" -d "${TITLE} https://tube.copylaradio.com/ipns/$IPNS/ Faites un don à son portefeuille pour le conserver dans le Mediacenter des Amis - https://CopyLaRadio.com - https://astroport.com" -p $HOME/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/QR.png) @@ -414,7 +414,16 @@ then MIME=$(file --mime-type "$HOME/astroport/${TYPE}/${REFERENCE}/${file}" | cut -d ':' -f 2 | cut -d ' ' -f 2) -# [[ echo "$MIME" | grep 'video' ]] && TEXT='' || TEXT='' +if [[ $(echo "$MIME" | grep 'video') ]]; then + TEXT='

'${TITLE}'

' + MIME="txt/html" + TAGS="${CAT}" + CANON='' +else + TEXT='' + TAGS='$:/isAttachment $:/isIpfs '${CAT} + CANON="/ipfs/"${IPFSID} +fi echo "## Creation json tiddler" echo '[ @@ -428,8 +437,8 @@ echo '[ "mediakey": "'${MEDIAKEY}'", "ipns": "'${IPNS}'", "tmdb": "'${REFERENCE}'", - "tags": "$:/isAttachment $:/isIpfs '${CAT}'", - "_canonical_uri": "/ipfs/'${IPFSID}'" + "tags": "'${TAGS}'", + "_canonical_uri": "'${CANON}'" } ] ' > ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json