feat: hide running Cocoa receiver from the Dock
This commit is contained in:
parent
c2f67c4781
commit
28748df3c1
2 changed files with 14 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
from collections.abc import Callable, Coroutine
|
||||
from typing import Literal
|
||||
|
||||
from AppKit import NSApplication, NSApplicationActivationPolicyAccessory
|
||||
from MediaPlayer import (
|
||||
MPChangePlaybackPositionCommandEvent,
|
||||
MPMusicPlaybackStatePlaying,
|
||||
|
@ -42,6 +43,9 @@ class CocoaNowPlayingReceiver(Receiver):
|
|||
pass
|
||||
|
||||
async def start(self, player: Player) -> None:
|
||||
NSApplication.sharedApplication().setActivationPolicy_(
|
||||
NSApplicationActivationPolicyAccessory
|
||||
)
|
||||
self.cmd_center = MPRemoteCommandCenter.sharedCommandCenter()
|
||||
self.info_center = MPNowPlayingInfoCenter.defaultCenter()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue