From cf64ffd5468f16258de6330172a85b3b8be9c873 Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Sat, 8 Jul 2017 12:30:31 +0000 Subject: [PATCH] new_scriptest --- tsu-extra.sh | 9 +++++++++ youtube-dl-android.sh | 12 ++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 tsu-extra.sh mode change 100755 => 100644 youtube-dl-android.sh diff --git a/tsu-extra.sh b/tsu-extra.sh new file mode 100644 index 0000000..3b2350f --- /dev/null +++ b/tsu-extra.sh @@ -0,0 +1,9 @@ +set -ex + +HOME=/storage/emulated/0 +PREFIX=/data/data/com.termux/files/usr +ROOT_HOME=$HOME/.suroot +ROOT_SHELL=$PREFIX/bin/bash +mkdir -p $HOME/.suroot + +su --preserve-environment -c "LD_LIBRARY_PATH=$PREFIX/lib HOME=$ROOT_HOME $ROOT_SHELL" diff --git a/youtube-dl-android.sh b/youtube-dl-android.sh old mode 100755 new mode 100644 index 8f5c1b3..f09954d --- a/youtube-dl-android.sh +++ b/youtube-dl-android.sh @@ -1,6 +1,10 @@ +#!/system/xbin/bash + +set -ex + read -p "Wie ist die URL? : " url read -p "Wo sollen die Dateien heruntergeladen werden? : " pfad -read -p "Soll ein Video heruntergeladen werden oder Audio? [opus/audio/video/BEST] : " format +read -p "Soll ein Video heruntergeladen werden oder Audio? [opus/audio/video/BEST/60k] : " format if [ "$format" == "opus" ] then @@ -11,12 +15,16 @@ then elif [ "$format" == "video" ] then format="-f 43" +elif [ "$format" == "60k" ] +then + format="-f 303+251" fi mkdir -p $pfad cd $pfad -/data/data/com.termux/files/usr/bin/python /data/data/com.termux/files/usr/bin/youtube-dl --ffmpeg-location /data/data/com.termux/files/usr/bin/ffmpeg -i $format $url +pwd +/data/data/com.termux/files/usr/bin/python /data/data/com.termux/files/usr/bin/youtube-dl --ffmpeg-location /data/data/com.termux/files/usr/bin/ffmpeg -i --socket-timeout 10000 $format $url # ROOT_SHELL="$PREFIX/bin/bash"