From 5d68a278dcd711c5e548719bcd82e0f8621420dc Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 5 Aug 2021 04:09:54 +0200 Subject: [PATCH] add PREFIX input param --- www/boris/get_youtube_videos.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/boris/get_youtube_videos.sh b/www/boris/get_youtube_videos.sh index ff5ce59..ff30334 100755 --- a/www/boris/get_youtube_videos.sh +++ b/www/boris/get_youtube_videos.sh @@ -1,9 +1,11 @@ #!/bin/bash ######################################################################## -# Author: +# Author: # Version: 0.1 # License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) ######################################################################## +PREFIX="$1" +[[ $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 -cat /home/$YOU/.zen/{ipfs,ipfs_swarm}/.*/astroport/kodi/vstream/YASTRXBIAN | sort | uniq | tail -n +2 +cat /home/$YOU/.zen/{ipfs,ipfs_swarm}/.*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | sort | uniq | tail -n +2