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

improv: filter firefox player #650

Merged
merged 1 commit into from
Sep 12, 2024
Merged

improv: filter firefox player #650

merged 1 commit into from
Sep 12, 2024

Conversation

wiiznokes
Copy link
Contributor

when using the plasma extension on firefox, player will be duplicated. The org.mpris.MediaPlayer2.plasma-browser-integration gives better results

[mpris2/src/media_player.rs:40:3] &players = [
    OwnedBusName::WellKnown(
        "org.mpris.MediaPlayer2.firefox.instance_1_379",
    ),
    OwnedBusName::WellKnown(
        "org.mpris.MediaPlayer2.plasma-browser-integration",
    ),
]
Mozilla org.mozilla.firefox (org.mozilla.firefox)
        Playback Status: Playing
        Position: N/A
        Doesn't support seeking
        Supported Rates: N/A
        Current Rate: N/A
        Metadata: {xesam:artist: [""], xesam:title: "(30) Mac Miller - Self Care - YouTube", mpris:trackid: "/org/mpris/MediaPlayer2/firefox", xesam:album: ""}
        Tracks: N/A
        Playlists: N/A
[mpris2/examples/list.rs:18:3] media_player.inner().destination() = BusName::WellKnown(
    "org.mpris.MediaPlayer2.plasma-browser-integration",
)
Mozilla Firefox (firefox)
        Playback Status: Playing
        Position: 1.5466449 seconds
        Supports seeking
        Supported Rates: 0.01x through 32x
        Current Rate: 1x
        Metadata: {mpris:trackid: "/org/kde/plasma/browser_integration/1337", mpris:artUrl: "https://i.ytimg.com/vi/SsKT0s5J8ko/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAbW4yvMJwrL_naXuEPiHOIDtBuwA", xesam:artist: ["Mac Miller"], kde:pid: 340574, mpris:length: 347221000, xesam:url: "https://www.youtube.com/watch?v=SsKT0s5J8ko", xesam:title: "Mac Miller - Self Care"}
        Tracks: N/A
        Playlists: N/A

With this fix, the applet will show

Mac Miller - Self Care
Mac Miller

instead of

(30) Mac Miller - Self Care - YouTube

With youtube music,

Self Care
Mac Miller

instead of

Youtube music

when inactice, or

Self Care - Youtube music

when active

@mmstick mmstick merged commit 6b8d3dc into pop-os:master Sep 12, 2024
2 checks passed
@mmstick
Copy link
Member

mmstick commented Sep 12, 2024

Thanks!

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