You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
peertube-bashscripts/peertube_list_videos.sh

26 lines
440 B

CONFIG_FILE_PATH=pt.conf
if [ ! -f $CONF_FILE_PATH ]; then echo "Config file not found...." && exit 1; fi
PT_HOST=$(cat $CONFIG_FILE_PATH | jq -r .host)
PT_ACCESS_TOKEN=$(cat $CONFIG_FILE_PATH | jq -r .access_token)
echo Fetching User....
TMPF=$(mktemp)
curl -sn -H "Authorization: Bearer $PT_ACCESS_TOKEN" https://$PT_HOST/api/v1/me/videos > videos
echo
cat $TMPF | jq .data[].id
echo
rm $TMPF
# debug
#echo $(cat $TMPF | jq)