Compare commits
No commits in common. "eb7509a4e04c4affc3ae17263a71dbf343777d1f" and "095c099a387be17583acfb687c327a9ce7c4a314" have entirely different histories.
eb7509a4e0
...
095c099a38
2 changed files with 36 additions and 54 deletions
|
@ -16,7 +16,7 @@ async def listen() -> None:
|
||||||
|
|
||||||
listener = MpdStateListener()
|
listener = MpdStateListener()
|
||||||
now_playing = CocoaNowPlaying(listener)
|
now_playing = CocoaNowPlaying(listener)
|
||||||
await listener.start(host=host, port=port, password=password)
|
await listener.start(hostname=host, port=port, password=password)
|
||||||
await listener.loop(now_playing)
|
await listener.loop(now_playing)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,45 +9,28 @@ MPMusicPlaybackStatePlaying: Final = 1
|
||||||
MPMusicPlaybackStatePaused: Final = 2
|
MPMusicPlaybackStatePaused: Final = 2
|
||||||
MPMusicPlaybackState = Literal[0, 1, 2]
|
MPMusicPlaybackState = Literal[0, 1, 2]
|
||||||
|
|
||||||
MPMediaItemPropertyAlbumTitle: Final = "albumTitle"
|
MPMediaItemPropertyAlbumTitle: Final = 'albumTitle'
|
||||||
MPMediaItemPropertyAlbumTrackNumber: Final = "albumTrackNumber"
|
MPMediaItemPropertyArtist: Final = 'artist'
|
||||||
MPMediaItemPropertyDiscNumber: Final = "discNumber"
|
MPMediaItemPropertyArtwork: Final = 'artwork'
|
||||||
MPMediaItemPropertyGenre: Final = "genre"
|
MPMediaItemPropertyPlaybackDuration: Final = 'playbackDuration'
|
||||||
MPMediaItemPropertyArtist: Final = "artist"
|
MPMediaItemPropertyTitle: Final = 'title'
|
||||||
MPMediaItemPropertyComposer: Final = "composer"
|
|
||||||
MPMediaItemPropertyArtwork: Final = "artwork"
|
|
||||||
MPMediaItemPropertyPlaybackDuration: Final = "playbackDuration"
|
|
||||||
MPMediaItemPropertyPersistentID: Final = "persistentID"
|
|
||||||
MPMediaItemPropertyTitle: Final = "title"
|
|
||||||
|
|
||||||
MPNowPlayingInfoPropertyMediaType: Final = "MPNowPlayingInfoPropertyMediaType"
|
MPNowPlayingInfoPropertyMediaType: Final = 'MPNowPlayingInfoPropertyMediaType'
|
||||||
MPNowPlayingInfoMediaTypeAudio: Final = 1
|
MPNowPlayingInfoMediaTypeAudio: Final = 1
|
||||||
MPNowPlayingInfoMediaTypeNone: Final = 0
|
MPNowPlayingInfoMediaTypeNone: Final = 0
|
||||||
|
|
||||||
MPNowPlayingInfoPropertyPlaybackQueueCount: Final = (
|
MPNowPlayingInfoPropertyElapsedPlaybackTime: Final = 'MPNowPlayingInfoPropertyElapsedPlaybackTime'
|
||||||
"MPNowPlayingInfoPropertyPlaybackQueueCount"
|
|
||||||
)
|
|
||||||
MPNowPlayingInfoPropertyPlaybackQueueIndex: Final = (
|
|
||||||
"MPNowPlayingInfoPropertyPlaybackQueueIndex"
|
|
||||||
)
|
|
||||||
MPNowPlayingInfoPropertyElapsedPlaybackTime: Final = (
|
|
||||||
"MPNowPlayingInfoPropertyElapsedPlaybackTime"
|
|
||||||
)
|
|
||||||
MPNowPlayingInfoPropertyExternalContentIdentifier: Final = (
|
|
||||||
"MPNowPlayingInfoPropertyExternalContentIdentifier"
|
|
||||||
)
|
|
||||||
|
|
||||||
class MPMediaItemArtwork:
|
class MPMediaItemArtwork:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def alloc() -> type[MPMediaItemArtwork]: ...
|
def alloc() -> type[MPMediaItemArtwork]: ...
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def initWithBoundsSize_requestHandler_(
|
def initWithBoundsSize_requestHandler_(size: CGSize, handler: Callable[[CGSize], NSImage]) -> MPMediaItemArtwork: ...
|
||||||
size: CGSize, handler: Callable[[CGSize], NSImage]
|
|
||||||
) -> MPMediaItemArtwork: ...
|
|
||||||
|
|
||||||
class MPNowPlayingInfoCenter:
|
class MPNowPlayingInfoCenter:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def defaultCenter() -> MPNowPlayingInfoCenter: ...
|
def defaultCenter() -> MPNowPlayingInfoCenter: ...
|
||||||
|
|
||||||
def setNowPlayingInfo_(self, info: NSMutableDictionary) -> None: ...
|
def setNowPlayingInfo_(self, info: NSMutableDictionary) -> None: ...
|
||||||
def setPlaybackState_(self, state: MPMusicPlaybackState) -> None: ...
|
def setPlaybackState_(self, state: MPMusicPlaybackState) -> None: ...
|
||||||
|
|
||||||
|
@ -61,13 +44,12 @@ class MPRemoteCommandEvent:
|
||||||
class MPRemoteCommand:
|
class MPRemoteCommand:
|
||||||
def setEnabled_(self, enabled: bool) -> None: ...
|
def setEnabled_(self, enabled: bool) -> None: ...
|
||||||
def removeTarget_(self, target: object) -> None: ...
|
def removeTarget_(self, target: object) -> None: ...
|
||||||
def addTargetWithHandler_(
|
def addTargetWithHandler_(self, handler: Callable[[MPRemoteCommandEvent], MPRemoteCommandHandlerStatus]) -> None: ...
|
||||||
self, handler: Callable[[MPRemoteCommandEvent], MPRemoteCommandHandlerStatus]
|
|
||||||
) -> None: ...
|
|
||||||
|
|
||||||
class MPRemoteCommandCenter:
|
class MPRemoteCommandCenter:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def sharedCommandCenter() -> MPRemoteCommandCenter: ...
|
def sharedCommandCenter() -> MPRemoteCommandCenter: ...
|
||||||
|
|
||||||
def togglePlayPauseCommand(self) -> MPRemoteCommand: ...
|
def togglePlayPauseCommand(self) -> MPRemoteCommand: ...
|
||||||
def playCommand(self) -> MPRemoteCommand: ...
|
def playCommand(self) -> MPRemoteCommand: ...
|
||||||
def pauseCommand(self) -> MPRemoteCommand: ...
|
def pauseCommand(self) -> MPRemoteCommand: ...
|
||||||
|
|
Loading…
Reference in a new issue