diff --git a/BUILD_FFMPEG.md b/BUILD_FFMPEG.md deleted file mode 100644 index 5e1e0ab4..00000000 --- a/BUILD_FFMPEG.md +++ /dev/null @@ -1,41 +0,0 @@ - -## FFmpeg for Android - -FFmpeg can be built for android using the termux ffmpeg package. - -Prerequisites : git, docker - - git clone git@github.com:termux/termux-packages.git - cd termux-packages - -create a file `build-ffmpeg.sh` with below content - - #!/bin/bash - # use i686 for x86 - export TERMUX_ARCH=arm - export TERMUX_PREFIX=/data/youtubedl-android/usr - export TERMUX_ANDROID_HOME=/data/youtubedl-android/home - ./build-package.sh ffmpeg - -Make file executable - - chmod +x ./build-ffmpeg.sh - -Build Package - - ./scripts/run-docker.sh ./clean.sh - ./scripts/run-docker.sh ./build-ffmpeg.sh - -This will create several `.deb` files in `debs/` directory. -`debs/*dev*.deb` debs can be safely removed as we don't need them. -`debs/*static*.deb` debs can be safely removed as we don't need them. -`libicu_66.1-1_arm.deb` can be removed (?) - - -The ffmpeg zip archive as used in youtubedl-android can be created using the following commands. - - cd debs - find . -type f -exec dpkg-deb -xv {} . \; - cd data/youtubedl-android - zip --symlinks -r /tmp/ffmpeg_arm.zip usr/lib - diff --git a/BUILD_PYTHON.md b/BUILD_PYTHON.md deleted file mode 100644 index d89b0528..00000000 --- a/BUILD_PYTHON.md +++ /dev/null @@ -1,50 +0,0 @@ - -## Python for Android - -Python can be built for android using the termux python package. - -Prerequisites : git, docker - - git clone git@github.com:termux/termux-packages.git - cd termux-packages - -create a file `build-python.sh` with below content - - #!/bin/bash - # use i686 for x86 - export TERMUX_ARCH=arm - export TERMUX_PREFIX=/data/youtubedl-android/usr - export TERMUX_ANDROID_HOME=/data/youtubedl-android/home - ./build-package.sh python - -Make file executable - - chmod +x ./build-python.sh - -Build Package - - ./scripts/run-docker.sh ./clean.sh - ./scripts/run-docker.sh ./build-python.sh - -This will create several `.deb` files in `debs/` directory. -I have found the following packages to be sufficient for youtube-dl to work. - - python_3.7.2-1_arm.deb - libandroid-support_24_arm.deb - libutil_0.4_arm.deb - libffi_3.2.1-2_arm.deb - openssl_1.1.1a_arm.deb - ca-certificates_20180124_all.deb - -The python zip archive as used in youtubedl-android can be created using the following commands. - - cd debs - dpkg-deb -xv python_3.7.2-1_arm.deb . - dpkg-deb -xv libandroid-support_24_arm.deb . - dpkg-deb -xv libutil_0.4_arm.deb . - dpkg-deb -xv libffi_3.2.1-2_arm.deb . - dpkg-deb -xv openssl_1.1.1a_arm.deb . - dpkg-deb -xv ca-certificates_20180124_all.deb . - cd data/youtubedl-android - zip --symlinks -r /tmp/python3_7_arm.zip usr/lib usr/etc - diff --git a/app/src/main/java/com/deniscerri/ytdlnis/DownloaderService.java b/app/src/main/java/com/deniscerri/ytdlnis/DownloaderService.java index 3ef0c596..79700225 100644 --- a/app/src/main/java/com/deniscerri/ytdlnis/DownloaderService.java +++ b/app/src/main/java/com/deniscerri/ytdlnis/DownloaderService.java @@ -25,6 +25,7 @@ import com.yausername.youtubedl_android.YoutubeDLRequest; import java.io.File; import java.io.FileOutputStream; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.LinkedList; import java.util.Map; @@ -149,13 +150,19 @@ public class DownloaderService extends Service { } public void updateQueue(ArrayList