altdesktop / playerctl

🎧 mpris media player command-line controller for vlc, mpv, RhythmBox, web browsers, cmus, mpd, spotify and others.
GNU Lesser General Public License v3.0
2.43k stars 79 forks source link

Utilizing markup_escape() to format metadata output results in Paused notifications being inhibited #235

Closed afzalarsalan closed 2 years ago

afzalarsalan commented 3 years ago

I have noticed whenever I use the markup_escape() function to format the metadata output from playerctl, I no longer receive notifications for when media is paused and unpaused with Youtube Music Desktop. This problem immediately alleviates itself whenever I remove any invocation of the function from my command input.

Sample command: playerctl metadata --format '{\"text\": \"\", \"tooltip\": \"{{markup_escape(playerName)}} {{markup_escape(title)}} - {{markup_escape(artist)}}\\n{{markup_escape(album)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F

Working command: playerctl metadata --format '{\"text\": \"{{title}} - {{artist}}\", \"tooltip\": \"{{playerName}}\\n{{title}} - {{artist}}\\n{{album}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F 2>/dev/null | sed -u 's/&/&/g'

afzalarsalan commented 3 years ago

The issue seems to revolve around line 270 in playerctl-player.c where the program is supposed to emit a signal in order to callback into the managed_player_properties_callback but it never seems to make it there for some reason, This seems to be the primary difference between the invocation of the program in the working and not working situations