Skip to content

Commit

Permalink
fix #87
Browse files Browse the repository at this point in the history
  • Loading branch information
jenslys committed Jul 16, 2024
1 parent bd89160 commit 237e489
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion AutoVOD.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ while true; do
else
FETCHED_TITLE=$(echo "$json" | jq -r '.stream_title')
FETCHED_GAME=$(echo "$json" | jq -r '.stream_game')

# URL encode the fetched game title
FETCHED_GAME_ENCODED=$(printf '%s' "$FETCHED_GAME" | jq -sRr @uri)
fi

if [ "$FETCHED_TITLE" = null ] || [ "$FETCHED_TITLE" = "initial_title" ]; then
Expand All @@ -144,7 +147,7 @@ while true; do
#? Replace the variables with the fetched metadata
for var in "${variables[@]}"; do
eval "$var=\${$var//\$STREAMER_TITLE/$FETCHED_TITLE}"
eval "$var=\${$var//\$STREAMER_GAME/$FETCHED_GAME}"
eval "$var=\${$var//\$STREAMER_GAME/$FETCHED_GAME_ENCODED}"
done
echo ""
fi
Expand Down

0 comments on commit 237e489

Please sign in to comment.