Add more MPNowPlaying properties to type stubs

This commit is contained in:
Danielle McLean 2023-12-06 11:51:29 +11:00
parent 095c099a38
commit 9a05d33177
Signed by: 00dani
GPG key ID: 52C059C3B22A753E

View file

@ -9,28 +9,45 @@ 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"
MPMediaItemPropertyArtist: Final = 'artist' MPMediaItemPropertyAlbumTrackNumber: Final = "albumTrackNumber"
MPMediaItemPropertyArtwork: Final = 'artwork' MPMediaItemPropertyDiscNumber: Final = "discNumber"
MPMediaItemPropertyPlaybackDuration: Final = 'playbackDuration' MPMediaItemPropertyGenre: Final = "genre"
MPMediaItemPropertyTitle: Final = 'title' MPMediaItemPropertyArtist: Final = "artist"
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
MPNowPlayingInfoPropertyElapsedPlaybackTime: Final = 'MPNowPlayingInfoPropertyElapsedPlaybackTime' MPNowPlayingInfoPropertyPlaybackQueueCount: Final = (
"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_(size: CGSize, handler: Callable[[CGSize], NSImage]) -> MPMediaItemArtwork: ... def initWithBoundsSize_requestHandler_(
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: ...
@ -44,12 +61,13 @@ 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_(self, handler: Callable[[MPRemoteCommandEvent], MPRemoteCommandHandlerStatus]) -> None: ... def addTargetWithHandler_(
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: ...