From f3d287ad59d42101458ab36a9b830709f0e026fa Mon Sep 17 00:00:00 2001 From: Jas Singh Date: Sat, 10 Aug 2024 00:45:12 -0700 Subject: [PATCH] Fixed the media scroller to work on the active player. (#101) * Fixed the media scroller to work on the active player. * Check existence of player first. --- modules/bar/media/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/bar/media/index.ts b/modules/bar/media/index.ts index 83227a3..7d35a07 100644 --- a/modules/bar/media/index.ts +++ b/modules/bar/media/index.ts @@ -77,8 +77,8 @@ const Media = () => { boxClass: "media", name: "media", props: { - on_scroll_up: () => mpris.getPlayer("")?.next(), - on_scroll_down: () => mpris.getPlayer("")?.previous(), + on_scroll_up: () => activePlayer.value?.next(), + on_scroll_down: () => activePlayer.value?.previous(), on_primary_click: (clicked: any, event: Gdk.Event) => { openMenu(clicked, event, "mediamenu"); },