Commit Graph
20 Commits
Author SHA1 Message Date
Michael Manganiello c7dfc9efb3 fix: Enable Loop mode sync for MPRIS
Loop mode changes were being correctly reflected in Supersonic, when
updated in the toolbar, but not the other way around. We were only
missing an `Options` changes emit when loop mode is changed in
Supersonic.
2024-02-24 15:17:13 -03:00
Michael Manganiello 56c78aad0c fix: MPRIS Seek functionality on Linux
Problem:

The operating system toolbar's component to control Supersonic playback
had its Seek functionality broken on Linux. When playing a song, seeking
for a different position from Supersonic worked as expected, but seeking
from the toolbar did nothing to the current track.

I found that the underlying reason was in `MPRISHandler.SetPosition`, as
the `if m.curTrackPath == trackId` always returned false.

`m.curTrackPath` was the right value, but `trackId` was wrong: On the
first song being played for a tracklist, `trackId` when trying to seek
was set to `/org/mpris/MediaPlayer2/TrackList/NoTrack`. When moving to
the next song, `trackId` then became the Track ID of the previously
played song.

Solution:

Changing the call to `OnTitle()` is enough to fix the issue, as the
MPRIS `Metadata()` generation depends on the value of `m.curTrackPath`.
Because it was being called before changing its value, the received
`trackId` was always off.
2024-02-24 13:26:04 -03:00
Drew Weymouth e9d462e655 move player package into backend 2024-01-08 18:53:13 -08:00
Drew Weymouth de6ba5c120 move LoopMode 2023-12-22 16:01:56 -08:00
Drew Weymouth df6c53a3f5 add interface to decouple MPV player from PlaybackManager 2023-12-18 20:22:24 -08:00
Drew Weymouth 1665281ad7 Refactor pt. 2: route player transport controls+callbacks through PlaybackManager 2023-12-18 09:06:17 -08:00
Drew Weymouth 55f9461410 Refactor pt. 1: move MPV player to own package and extract some types 2023-12-17 13:50:30 -08:00
Lite Ye ce685933be Fix invalid object path in mpris integration 2023-08-29 09:03:13 -07:00
Celyn Walters f2e4805b29 Add ContentCreated, UseCount to MPRIS result 2023-08-27 18:20:00 -07:00
Drew Weymouth 5a5f551613 Fixes #220, Fixes #221: a few MPRIS bugs 2023-07-17 17:01:27 -07:00
Drew Weymouth 36bc8ef57b use no track object path instead of empty string 2023-07-17 17:01:03 -07:00
Drew Weymouth e754b40a09 implement MPRIS SetVolume 2023-07-13 14:41:11 -07:00
Drew Weymouth a12b6dd276 expose repeat mode through MPRIS 2023-07-13 13:12:57 -07:00
Drew Weymouth 41053a22a8 upgrade go-mpris-server; gracefully handle no dbus connection 2023-07-13 12:51:19 -07:00
Drew Weymouth 8a1a3795bc uncomment events and fix artURL - will crash unless building against pull #4 in quarckster/go-mpris-server 2023-07-12 18:14:20 -07:00
Drew Weymouth a9bafd76c7 emitting events is crashing for some reason; comment out for now 2023-07-12 17:41:16 -07:00
Drew Weymouth 3b204572b1 mpris events 2023-07-12 17:41:16 -07:00
Drew Weymouth 61d5ad917d more mpris features 2023-07-12 17:41:16 -07:00
Drew Weymouth 2a17718969 add implementations for several mpris methods 2023-07-12 17:41:16 -07:00
Drew Weymouth 1ce8442138 start evaluating quarckster/go-mpris-server 2023-07-12 17:41:16 -07:00