fix pipe chars

This commit is contained in:
xenia 2021-06-10 02:43:08 -04:00
parent 53648c1098
commit dce27613de
1 changed files with 6 additions and 6 deletions

View File

@ -19,19 +19,19 @@ for player in $(qdbus $MPRIS_ROOT); do
title=$(echo "$metadata" | grep "$XESAM_TITLE")
title=${title#"$XESAM_TITLE"}
title=$(echo "$title" | recode ascii..html)
artist=$(echo "$artist" | recode ascii..html)
artist2=$(echo "$artist2" | recode ascii..html)
title=$(echo "$title" | sed -e 's/&/&amp;/g' -e 's/</&lt;/g' -e 's/>/&gt;/g' -e 's/|/\&#124;/g')
artist=$(echo "$artist" | sed -e 's/&/&amp;/g' -e 's/</&lt;/g' -e 's/>/&gt;/g' -e 's/|/\&#124;/g')
artist2=$(echo "$artist2" | sed -e 's/&/&amp;/g' -e 's/</&lt;/g' -e 's/>/&gt;/g' -e 's/|/\&#124;/g')
if [ "$title" != "" ]; then
if [ "$artist" == "" ]; then
if [ "$artist2" == "" ]; then
echo "$title | iconName=multimedia-audio-player-symbolic"
echo "<span color='#ddccff'>$title</span> | iconName=multimedia-audio-player-symbolic"
else
echo "$artist2 - $title | iconName=multimedia-audio-player-symbolic"
echo "<span color='#ffffff'>$artist2</span> - <span color='#ddccff'>$title</span> | iconName=multimedia-audio-player-symbolic"
fi
else
echo "$artist - $title | iconName=multimedia-audio-player-symbolic"
echo "<span color='#ffffff'>$artist</span> - <span color='#ddccff'>$title</span> | iconName=multimedia-audio-player-symbolic"
fi
echo "---"
exit