importing the compiled pb2 modules with alias
This commit is contained in:
@@ -7,7 +7,7 @@ from librespot.dealer import DealerClient
|
||||
from librespot.player import Player
|
||||
from librespot.player import PlayerConfiguration
|
||||
from librespot.player.state import DeviceStateHandler
|
||||
from librespot.proto import Connect_pb2
|
||||
from librespot.proto import Connect_pb2 as Connect
|
||||
from librespot.proto.Player_pb2 import ContextPlayerOptions
|
||||
from librespot.proto.Player_pb2 import PlayerState
|
||||
from librespot.proto.Player_pb2 import Restrictions
|
||||
@@ -52,7 +52,7 @@ class StateWrapper(DeviceStateHandler.Listener, DealerClient.MessageListener):
|
||||
self._device.add_listener(listener)
|
||||
|
||||
def ready(self) -> None:
|
||||
self._device.update_state(Connect_pb2.PutStateReason.NEW_DEVICE, 0,
|
||||
self._device.update_state(Connect.PutStateReason.NEW_DEVICE, 0,
|
||||
self._state)
|
||||
|
||||
def on_message(self, uri: str, headers: typing.Dict[str, str],
|
||||
|
||||
Reference in New Issue
Block a user