fix pipe chars
This commit is contained in:
parent
53648c1098
commit
dce27613de
12
np.10s.sh
12
np.10s.sh
|
@ -19,19 +19,19 @@ for player in $(qdbus $MPRIS_ROOT); do
|
||||||
title=$(echo "$metadata" | grep "$XESAM_TITLE")
|
title=$(echo "$metadata" | grep "$XESAM_TITLE")
|
||||||
title=${title#"$XESAM_TITLE"}
|
title=${title#"$XESAM_TITLE"}
|
||||||
|
|
||||||
title=$(echo "$title" | recode ascii..html)
|
title=$(echo "$title" | sed -e 's/&/&/g' -e 's/</</g' -e 's/>/>/g' -e 's/|/\|/g')
|
||||||
artist=$(echo "$artist" | recode ascii..html)
|
artist=$(echo "$artist" | sed -e 's/&/&/g' -e 's/</</g' -e 's/>/>/g' -e 's/|/\|/g')
|
||||||
artist2=$(echo "$artist2" | recode ascii..html)
|
artist2=$(echo "$artist2" | sed -e 's/&/&/g' -e 's/</</g' -e 's/>/>/g' -e 's/|/\|/g')
|
||||||
|
|
||||||
if [ "$title" != "" ]; then
|
if [ "$title" != "" ]; then
|
||||||
if [ "$artist" == "" ]; then
|
if [ "$artist" == "" ]; then
|
||||||
if [ "$artist2" == "" ]; then
|
if [ "$artist2" == "" ]; then
|
||||||
echo "$title | iconName=multimedia-audio-player-symbolic"
|
echo "<span color='#ddccff'>$title</span> | iconName=multimedia-audio-player-symbolic"
|
||||||
else
|
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
|
fi
|
||||||
else
|
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
|
fi
|
||||||
echo "---"
|
echo "---"
|
||||||
exit
|
exit
|
||||||
|
|
Loading…
Reference in New Issue