mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-14 02:26:56 -07:00
Add verbose output for in-use check
This commit is contained in:
parent
6a882a8ad3
commit
6f5b057e22
1 changed files with 1 additions and 0 deletions
|
@ -198,6 +198,7 @@ running() {
|
|||
# Get a total count of active media (MediaContainer size), then deduct one for every paused stream.
|
||||
# If all streams are paused, we consider the server to not be active.
|
||||
local mediacount="$(awk -F'"' '/<MediaContainer size="[0-9]+">/ {count+=$2}; /<Player[^>]* state="paused"/ {count--}; END {print count}' <<< "${DATA}")"
|
||||
[ "$VERBOSE" = "yes" ] && printf 'Activity check reports a count of %b, based on return data of:\n%s\n\n' "${DATA}" >&2
|
||||
[ $mediacount -gt 0 ] && return 0
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue