Skip to content

Commit

Permalink
Change mpris trackno format placeholder to tracknumber
Browse files Browse the repository at this point in the history
  • Loading branch information
ilmiont authored Jan 2, 2025
1 parent cd51cd5 commit c6a8206
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions py3status/modules/mpris.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{state} playback status of the player
{time} played time of the song
{title} name of the song
{trackno} track number of the song
{tracknumber} track number of the song
{nowplaying} now playing field provided by VLC for stream info
Button placeholders:
Expand Down Expand Up @@ -281,7 +281,7 @@ def metadata(self, metadata=None):

# we are converting the attribute name to lowercase because although the spec
# says it's `xesam:trackNumber`, VLC exposes it as `xesam:tracknumber`
self._metadata["trackno"] = metadata.get(Metadata_Map.TRACK_NUMBER.lower());
self._metadata["tracknumber"] = metadata.get(Metadata_Map.TRACK_NUMBER.lower());

self._metadata["nowplaying"] = metadata.get("vlc:nowplaying", None)

Expand Down Expand Up @@ -412,7 +412,7 @@ def post_config_hook(self):
"artist": None,
"length": None,
"title": None,
"trackno": None,
"tracknumber": None,
"nowplaying": None,
"time": None,
"state": None,
Expand Down Expand Up @@ -483,7 +483,7 @@ def post_config_hook(self):
self._color_inactive = self.py3.COLOR_CONTROL_INACTIVE or self.py3.COLOR_BAD

self._format_contains_metadata = False
self._metadata_keys = ["album", "artist", "title", "nowplaying", "length", "trackno"]
self._metadata_keys = ["album", "artist", "title", "nowplaying", "length", "tracknumber"]
for key in self._metadata_keys:
if self.py3.format_contains(self.format, key):
self._format_contains_metadata = True
Expand Down

0 comments on commit c6a8206

Please sign in to comment.