Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement track number support for mpris module #2280

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ilmiont
Copy link

@ilmiont ilmiont commented Dec 31, 2024

Adds a new {trackno} format placeholder that returns the current track number value

Uses the xesam:tracknumber metadata attribute, which works with VLC

Adds a new {trackno} format placeholder that returns the current track number value

Uses the xesam:tracknumber metadata attribute, which works with VLC
@@ -278,6 +279,10 @@ def metadata(self, metadata=None):

self._metadata["length"] = self._get_time_str(metadata.get(Metadata_Map.LENGTH))

# 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());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Placeholder should be {tracknumber} imho.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lasers - I've added commit c6a8206 which changes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants