This commit is contained in:
fred 2022-04-23 02:31:40 +02:00
parent cc549848ad
commit 21ca6b213c
3 changed files with 16 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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='<video height='${RES}'x controls preload=none> <source src=/ipfs/'${IPFSREPFILEID}'/'${file}' type='${MIME}'> </video>' || TEXT=''
if [[ $(echo "$MIME" | grep 'video') ]]; then
TEXT='<video height='${RES}'x width=100% controls preload=none><source src=/ipfs/'${IPFSID}' type='${MIME}'></video><h1>'${TITLE}'</h1>'
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