Skip to content

Metadata change delay #363

Open
Open
@ShrekRequiem

Description

Environment & Versions

  • System: Linux : NixOS unstable
  • Termusic version: 0.9.0
  • Rust version: 1.78.0

Logs:
empty

Description of the Problem

It's working perfectly but there is a big delay between a song change and the time playerctl metadata change. It's not a big deal but I have the following script that I use to have a little player on my waybar and it doesn't change until minutes after the song change. The problem is specific to termusic (no problem with other players) and stays regardless of the backend (tried all of them). I might've missed something but I'm pretty sure this is my last resort.

#!/bin/bash

playerctl_status=$(playerctl status 2>/dev/null)

if [[ $playerctl_status == "Playing" ]]; then
    title=$(playerctl metadata title 2>/dev/null)
    echo '{"text":"󰎈 󰏤","class":"playing","title":"$title"}'
elif [[ $playerctl_status == "Paused" ]]; then
    title=$(playerctl metadata title 2>/dev/null)
    echo '{"text":"󰎈 󰐊","class":"paused","title":"$title"}'
else
    echo '{"text":""}'
fi

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions