fix(services): clean up importsand simplify Seeked handling

- New Features:
- Enhancements: Added module‑level logger import.
- Bug Fixes: Simplified Seeked handling and corrected metadata type annotation.
This commit is contained in:
sankalp committed 2026-04-10 00:10:24 +05:45
1 parent eb12354d00
commit 76c409fce1
2 files changed
+5 -6

No files matched your search

+1 -3
View File
@@ -12,7 +12,7 @@ from fabric.notifications import (
)
# Fabric imports
from fabric.utils import GdkPixbuf, os
from fabric.utils import GdkPixbuf, os, logger
import config.data as data
@@ -295,8 +295,6 @@ class CachedNotifications(Notifications):
# Don't call super() - we're handling this ourselves
# Import logger at the top of the function
from loguru import logger
notification = self.get_notification_from_id(notification_id)
if not notification:
+4 -3
View File
@@ -8,7 +8,6 @@ from fabric.utils.helpers import (
pascal_case_to_snake_case,
snake_case_to_kebab_case,
)
from gi.repository.GLib import Variant
from utils.dbus_helper import GioDBusHelper
@@ -86,7 +85,9 @@ class MprisPlayer(Service):
@Property(dict, "readable")
def metadata(self) -> dict:
prop: Variant | None = self._dbus_helper.proxy.get_cached_property("Metadata") # type: ignore
prop: GLib.Variant | None = self._dbus_helper.proxy.get_cached_property(
"Metadata"
) # type: ignore
return dict(prop) if prop else {} # type: ignore
# RELY ON METADATA
@@ -253,7 +254,7 @@ class MprisPlayer(Service):
):
# Only One Signal for Mpris
if signal_name == "Seeked":
self.seeked(params[0].get_int64())
self.seeked(params[0])
def _proxy_call(self, method_name: str, parameter: Optional[GLib.Variant]):
self._dbus_helper.proxy.call(