media-sucker/scripts/status.json.sh

17 lines
305 B
Bash
Executable File

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