mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 06:15:21 +01:00
[GH-ISSUE #970] popup-music: seeking position doesn't use precise position but instead changes it in steps of 5 seconds #4518
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#4518
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @postsolar on GitHub (May 12, 2025).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/970
Describe the bug
When seeking position, it doesn't set the position to its absolute value but instead increments or decrements it in intervals of 5 seconds. So, if position at, say, 03:00, and I try to set it to 04:00, it would instead be set to 03:05. And vice versa, if it's at 03:00 and I try to set it to 02:00, it would be set to 02:55 instead.
To Reproduce
Steps to reproduce the behavior:
musicExpected behavior
Position seeking works
System information:
Configuration
Config
Additional context
playerctl v2.4.1, launched in daemon mode (
playerctld)@JakeStanger commented on GitHub (May 12, 2025):
How are you performing the seek? It can behave differently depending on whether it's keyboard/mouse/trackpad
@postsolar commented on GitHub (May 12, 2025):
Touchpad. Either click anywhere within the duration bar, or click and hold the slider to drag it.
I meant to attach a video demo but something is currently broken in my Hyprland setup wrt screen recording.
@postsolar commented on GitHub (May 12, 2025):
https://github.com/user-attachments/assets/0fa1b635-deb6-4f6e-83b0-ac2bdcb28b8f
@JakeStanger commented on GitHub (May 12, 2025):
I believe the issue here is as simple as changing the last argument from
5.0github.com/JakeStanger/ironbar@28136f62bf/src/modules/music/mod.rs (L336)Ideally that should be configurable. Fingers crossed my PC is running again in a couple of days and I can resolve, otherwise happy for this to be picked up :)
@postsolar commented on GitHub (May 12, 2025):
This one is volume and not progress though? I tried setting it to 10.0 just in case and it has no effect on the progress bar.
I suspect the UI part is correct, it's just that something happens between setting the position with mouse and mpris receiving the right command. To be clear, it's not that UI doesn't update correctly (there's a brief moment where it does), but that mpris only skips 5 seconds forward or backward instead of setting an absolute position (and then UI updates to reflect this).
I imagine it originates somewhere here:
github.com/JakeStanger/ironbar@28136f62bf/src/modules/music/mod.rs (L173)But from what I understand communicating with mpris is all done by an upstream crate?
@JakeStanger commented on GitHub (May 12, 2025):
🤦 oh yeah. Yeah it won't be that then. Sorry
Yes, although I don't think that's doing anything other than passing the milliseconds to DBUS:
github.com/Mange/mpris-rs@9f55730b9d/src/player.rs (L635-L639)Have you confirmed if the same behaviour occurs across multiple players? This could be something specific to the player implementation.
@postsolar commented on GitHub (May 12, 2025):
Actually, no. But now that I did I think mpv and telegram-desktop handle this correctly whereas Chrome and Firefox do not. On the other hand,
playerctl position <absolute position>also works correctly with Firefox.I think what they do is use
set_positioninstead ofseekfor an absolute position:github.com/altdesktop/playerctl@b19a71cb9d/playerctl/playerctl-cli.c (L363-L379)There's a
set_positionfunction in the Rust crate too, but I'm not sure how to get the track ID.@JakeStanger commented on GitHub (May 12, 2025):
Player#get_metadatawill return thathttps://docs.rs/mpris/latest/mpris/struct.Player.html