Skip to content

fix: MPRIS seeked signals reporting old position instead of new - #1408

Closed
Endg4meZer0 wants to merge 1 commit into
cmus:masterfrom
Endg4meZer0:master
Closed

Endg4meZer0 wants to merge 1 commit into
cmus:masterfrom
Endg4meZer0:master

Conversation

@Endg4meZer0

@Endg4meZer0 Endg4meZer0 commented Feb 25, 2025 •

Copy link
Copy Markdown
Contributor

Fixing #1407, probably in a hacky way. Would've been great if someone knowledgeable took a look and said if it's OK as it is.

@gavtroy gavtroy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not the someone knowledgeable you mentioned but it looks good to me.

@pgaskin
pgaskin self-requested a review March 16, 2025 07:24

@pgaskin pgaskin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks fine to me. I'll test this later.

On a side note, we might want to consider debouncing MPRIS signals.

@pgaskin
pgaskin self-requested a review March 16, 2025 07:30
@Endg4meZer0

Copy link
Copy Markdown
Contributor Author

Hey, is there any update on it?

@pgaskin

pgaskin commented Apr 23, 2025

Copy link
Copy Markdown
Member

Not yet, I tend to do cmus maintenance in bursts since I don't currently have too much time to devote to it.

@pgaskin pgaskin mentioned this pull request Jan 10, 2026

@pgaskin pgaskin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

PR looks fine wrt concurrency and locking. It also happens to fix the consumer loop potentially getting blocked on a dbus emit of a seeked event.

The flag implementation looks correct overall (it can't get dropped mistakenly), but there's a few other minor issues:

  • Position may still be old if changed between player_unlock and the next snapshot.
  • Not safe to call player_seek from other threads.
  • Duplicate seeked event on startup if resume is enabled.

Side note: this change also means that failed seeks don't emit seeked, but that makes sense.

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.

3 participants