media-sucker/scripts/status.json.sh

17 lines
328 B
Bash
Executable File

#! /bin/sh
. /scripts/common.sh
cat <<EOD
{
"finished": {
"video": $(ls *.mkv 2>/dev/null | jq -nR '[inputs]'),
"audio": $(ls */*/.mp3 2>/dev/null | jq -nR '[inputs]')
},
"status": {
"reader": $(cat status.reader | jq -nR '[inputs][0]'),
"encoder": $(cat status.encoder | jq -nR '[inputs][0]')
}
}
EOD