Move mpris implementation from infinitime library to itd, where it really belongs #41

Merged
Elara6331 merged 2 commits from FloralExMachina/itd:master into master 2022-11-22 02:24:51 +00:00
Contributor

This PR Copys the Mpris implementation from the infinitime library and on acceptance a follow up PR to the infinitime library will remove the implementation there. The justification for this is that the library's purpose is facilitating the transmission and reception of events between a device and host, the onus is on the user of the library to take actions on recieved events. This is already reflected with the desktop notification relay, call relay, and maps, This also opens up future support for (white|black) listing players to avoid misbehaving implementors e.g chromium (and browsers based on it) or disabling the use of mpris altogether via the config, in favour listening for music button events with itctl

This PR Copys the Mpris implementation from the infinitime library and on acceptance a follow up PR to the infinitime library will remove the implementation there. The justification for this is that the library's purpose is facilitating the transmission and reception of events between a device and host, the onus is on the user of the library to take actions on recieved events. This is already reflected with the desktop notification relay, call relay, and maps, This also opens up future support for (white|black) listing players to avoid misbehaving implementors e.g [chromium](https://bugs.chromium.org/p/chromium/issues/detail?id=1101966&q=mpris&can=2) (and browsers based on it) or disabling the use of mpris altogether via the config, in favour listening for music button events with itctl
FloralExMachina added 1 commit 2022-11-21 22:36:45 +00:00
copy mpris implementation from infinitime library to itd, where it really belongs
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
1e8c9484d2
moved dbus.go to an internal utils package
added context function parameter to initMusicCtrl and updated main.go to pass it
updated calls.go, maps.go, music.go, and notifs.go to use utils package for getting a dus connection
Elara6331 requested changes 2022-11-21 23:58:45 +00:00
@ -0,0 +15,4 @@
onChangeOnce sync.Once
)
// Init makes required connections to DBis and
Owner

There's a typo here. Should be DBus, not DBis

There's a typo here. Should be `DBus`, not `DBis`
Owner

Other than that, it seems good to me. I probably should've placed that in ITD in the first place, I was meaning to move it eventually but never got around to it and then forgot. Thanks for the PR.

Other than that, it seems good to me. I probably should've placed that in ITD in the first place, I was meaning to move it eventually but never got around to it and then forgot. Thanks for the PR.
FloralExMachina added 1 commit 2022-11-22 02:23:29 +00:00
fixed type in comment about DBus
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
f215e4fd90
FloralExMachina requested review from Elara6331 2022-11-22 02:24:09 +00:00
Author
Contributor

fixed :)

fixed :)
Elara6331 approved these changes 2022-11-22 02:24:46 +00:00
Elara6331 left a comment
Owner

Thanks, merging now

Thanks, merging now
Elara6331 merged commit b64e6d27d4 into master 2022-11-22 02:24:51 +00:00
Sign in to join this conversation.
No description provided.