feat(media): Factory dispatcht auf win32 zum SmtcController
This commit is contained in:
@@ -13,8 +13,8 @@ class MediaController(Protocol):
|
||||
def create_media_controller(enabled: bool) -> MediaController:
|
||||
"""Erstellt den plattformspezifischen Media-Controller.
|
||||
|
||||
`enabled=False` → immer NoopController. Auf Nicht-Linux-Plattformen
|
||||
wird aktuell ebenfalls der NoopController zurückgegeben.
|
||||
`enabled=False` → immer NoopController. Auf nicht unterstützten Plattformen
|
||||
wird ebenfalls der NoopController zurückgegeben.
|
||||
"""
|
||||
if not enabled:
|
||||
from whisper_local.media._noop import NoopController
|
||||
@@ -22,5 +22,8 @@ def create_media_controller(enabled: bool) -> MediaController:
|
||||
if sys.platform == "linux":
|
||||
from whisper_local.media._mpris import MprisController
|
||||
return MprisController()
|
||||
if sys.platform == "win32":
|
||||
from whisper_local.media._smtc import SmtcController
|
||||
return SmtcController()
|
||||
from whisper_local.media._noop import NoopController
|
||||
return NoopController()
|
||||
|
||||
Reference in New Issue
Block a user