From ac9de2ef9c26c3006e14df3d9e48dde28ca2bcf4 Mon Sep 17 00:00:00 2001 From: tsof1 <100219430+tsof1@users.noreply.github.com> Date: Tue, 12 Jul 2022 20:38:22 +0100 Subject: [PATCH 1/2] Initial Android support --- termv | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/termv b/termv index 2a5469b..f425d8f 100755 --- a/termv +++ b/termv @@ -84,7 +84,9 @@ update_channelsfile() { } # check if necessary programs are installed -for prog in mpv fzf jq curl gawk; do +DEPENDENCIES="fzf jq curl gawk" +[ "$(uname -o)" != "Android" ] && DEPENDENCIES="mpv ${DEPENDENCIES}" +for prog in ${DEPENDENCIES}; do ! has "$prog" && dependencies_not_installed="${dependencies_not_installed}${prog}, " done @@ -139,6 +141,8 @@ _play() { # shellcheck disable=SC2086 mpv "${*##* }" ${TERMV_MPV_FLAGS} --force-media-title="${*%% *}" --force-window=immediate xdo show "$WID" && xdo activate "$WID" + elif [ "$(uname -o)" == "Android" ]; then + am start -n is.xyz.mpv/is.xyz.mpv.MPVActivity -e filepath "${*##* }" else # shellcheck disable=SC2086 mpv "${*##* }" ${TERMV_MPV_FLAGS} --force-media-title="${*%% *}" From faa8ef61e7f92b8a074382a70f917db61839ebb6 Mon Sep 17 00:00:00 2001 From: tsof1 <100219430+tsof1@users.noreply.github.com> Date: Tue, 12 Jul 2022 20:58:23 +0100 Subject: [PATCH 2/2] Add Android support to the README --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 9a5bbb0..12b4108 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,9 @@ brew tap Roshan-R/termv https://github.com/Roshan-R/homebrew-termv brew install termv ``` +### Android +For Android users with [termux](https://termux.org/) and [mpv-android](https://github.com/mpv-android/mpv-android) installed, it is possible to direct install to a folder in the path + ### Installation by cloning the repository ```sh