diff --git a/www/boris/film.php b/www/boris/film.php index d7d8d0e..7b36928 100644 --- a/www/boris/film.php +++ b/www/boris/film.php @@ -5,6 +5,7 @@ require_once('functions.php'); $videosList = array(); +// HOWTO PASS Query parameters to exec ? exec("/bin/bash -c './get_astrxbian_index.sh F'", $videos); exec("/bin/bash -c './check_my_wallet.sh'", $gg1); diff --git a/www/boris/get_astrxbian_index.sh b/www/boris/get_astrxbian_index.sh index 10dde16..727f816 100755 --- a/www/boris/get_astrxbian_index.sh +++ b/www/boris/get_astrxbian_index.sh @@ -5,8 +5,10 @@ # License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) ######################################################################## PREFIX="$1" +FILTER="$2" [[ $PREFIX == "" ]] && PREFIX="Y" YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) && [[ ! $YOU ]] && echo "ipfs NOT RUNNING. EXIT" && exit 1 # Filter no ipns link -cat /home/$YOU/.zen/{ipfs,ipfs_swarm}/.*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | grep -Ev "];;" | sort | uniq | tail -n +2 +[[ ! $FILTER ]] && cat /home/$YOU/.zen/{ipfs,ipfs_swarm}/.*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | grep -Ev "];;" | sort | uniq | tail -n +2 && exit 0 +cat /home/$YOU/.zen/{ipfs,ipfs_swarm}/.*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | grep -Ev "];;" | grep "$FILTER" | sort | uniq | tail -n +2