fixed the _pb2 suffix error and import errors
This commit is contained in:
parent
ee247d8a2b
commit
0214721dd7
|
@ -1,4 +1,4 @@
|
|||
from librespot.proto.Keyexchange import *
|
||||
from librespot.proto.Keyexchange_pb2 import *
|
||||
import platform
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ from zeroconf import Zeroconf
|
|||
from librespot.common import Utils
|
||||
from librespot.core import Session
|
||||
from librespot.crypto import DiffieHellman
|
||||
from librespot.proto import Connect
|
||||
from librespot.proto import Connect_pb2
|
||||
from librespot.standard import Closeable
|
||||
from librespot.standard import Runnable
|
||||
|
||||
|
@ -61,7 +61,7 @@ class ZeroconfServer(Closeable):
|
|||
)
|
||||
|
||||
class Inner:
|
||||
device_type: Connect.DeviceType = None
|
||||
device_type: Connect_pb2.DeviceType = None
|
||||
device_name: str = None
|
||||
device_id: str = None
|
||||
preferred_locale: str = None
|
||||
|
@ -69,7 +69,7 @@ class ZeroconfServer(Closeable):
|
|||
|
||||
def __init__(
|
||||
self,
|
||||
device_type: Connect.DeviceType,
|
||||
device_type: Connect_pb2.DeviceType,
|
||||
device_name: str,
|
||||
preferred_locale: str,
|
||||
conf: Session.Configuration,
|
||||
|
|
|
@ -12,8 +12,8 @@ from librespot.common.Utils import Utils
|
|||
from librespot.core import Session
|
||||
from librespot.metadata import PlayableId
|
||||
from librespot.metadata import TrackId
|
||||
from librespot.proto import Metadata
|
||||
from librespot.proto import StorageResolve
|
||||
from librespot.proto import Metadata_pb2
|
||||
from librespot.proto import StorageResolve_pb2
|
||||
|
||||
|
||||
class PlayableContentFeeder:
|
||||
|
@ -26,7 +26,7 @@ class PlayableContentFeeder:
|
|||
def __init__(self, session: Session):
|
||||
self.session = session
|
||||
|
||||
def pick_alternative_if_necessary(self, track: Metadata.Track):
|
||||
def pick_alternative_if_necessary(self, track: Metadata_pb2.Track):
|
||||
if len(track.file) > 0:
|
||||
return track
|
||||
|
||||
|
@ -49,7 +49,7 @@ class PlayableContentFeeder:
|
|||
|
||||
def resolve_storage_interactive(
|
||||
self, file_id: bytes,
|
||||
preload: bool) -> StorageResolve.StorageResolveResponse:
|
||||
preload: bool) -> StorageResolve_pb2.StorageResolveResponse:
|
||||
resp = self.session.api().send(
|
||||
"GET",
|
||||
(self.STORAGE_RESOLVE_INTERACTIVE_PREFETCH
|
||||
|
@ -65,13 +65,13 @@ class PlayableContentFeeder:
|
|||
if body is None:
|
||||
RuntimeError("Response body is empty!")
|
||||
|
||||
storage_resolve_response = StorageResolve.StorageResolveResponse()
|
||||
storage_resolve_response = StorageResolve_pb2.StorageResolveResponse()
|
||||
storage_resolve_response.ParseFromString(body)
|
||||
return storage_resolve_response
|
||||
|
||||
def load_track(
|
||||
self,
|
||||
track_id_or_track: typing.Union[TrackId, Metadata.Track],
|
||||
track_id_or_track: typing.Union[TrackId, Metadata_pb2.Track],
|
||||
audio_quality_picker: AudioQualityPicker,
|
||||
preload: bool,
|
||||
halt_listener: HaltListener,
|
||||
|
@ -94,9 +94,9 @@ class PlayableContentFeeder:
|
|||
|
||||
def load_stream(
|
||||
self,
|
||||
file: Metadata.AudioFile,
|
||||
track: Metadata.Track,
|
||||
episode: Metadata.Episode,
|
||||
file: Metadata_pb2.AudioFile,
|
||||
track: Metadata_pb2.Track,
|
||||
episode: Metadata_pb2.Episode,
|
||||
preload: bool,
|
||||
halt_lister: HaltListener,
|
||||
):
|
||||
|
@ -104,41 +104,41 @@ class PlayableContentFeeder:
|
|||
raise RuntimeError()
|
||||
|
||||
resp = self.resolve_storage_interactive(file.file_id, preload)
|
||||
if resp.result == StorageResolve.StorageResolveResponse.Result.CDN:
|
||||
if resp.result == StorageResolve_pb2.StorageResolveResponse.Result.CDN:
|
||||
if track is not None:
|
||||
return CdnFeedHelper.load_track(self.session, track, file,
|
||||
resp, preload, halt_lister)
|
||||
return CdnFeedHelper.load_episode(self.session, episode, file,
|
||||
resp, preload, halt_lister)
|
||||
elif resp.result == StorageResolve.StorageResolveResponse.Result.STORAGE:
|
||||
elif resp.result == StorageResolve_pb2.StorageResolveResponse.Result.STORAGE:
|
||||
if track is None:
|
||||
# return StorageFeedHelper
|
||||
pass
|
||||
elif resp.result == StorageResolve.StorageResolveResponse.Result.RESTRICTED:
|
||||
elif resp.result == StorageResolve_pb2.StorageResolveResponse.Result.RESTRICTED:
|
||||
raise RuntimeError("Content is restricted!")
|
||||
elif resp.result == StorageResolve.StorageResolveResponse.Response.UNRECOGNIZED:
|
||||
elif resp.result == StorageResolve_pb2.StorageResolveResponse.Response.UNRECOGNIZED:
|
||||
raise RuntimeError("Content is unrecognized!")
|
||||
else:
|
||||
raise RuntimeError("Unknown result: {}".format(resp.result))
|
||||
|
||||
class LoadedStream:
|
||||
episode: Metadata.Episode
|
||||
track: Metadata.Track
|
||||
episode: Metadata_pb2.Episode
|
||||
track: Metadata_pb2.Track
|
||||
input_stream: GeneralAudioStream
|
||||
normalization_data: NormalizationData
|
||||
metrics: PlayableContentFeeder.Metrics
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
track_or_episode: typing.Union[Metadata.Track, Metadata.Episode],
|
||||
track_or_episode: typing.Union[Metadata_pb2.Track, Metadata_pb2.Episode],
|
||||
input_stream: GeneralAudioStream,
|
||||
normalization_data: NormalizationData,
|
||||
metrics: PlayableContentFeeder.Metrics,
|
||||
):
|
||||
if type(track_or_episode) is Metadata.Track:
|
||||
if type(track_or_episode) is Metadata_pb2.Track:
|
||||
self.track = track_or_episode
|
||||
self.episode = None
|
||||
elif type(track_or_episode) is Metadata.Episode:
|
||||
elif type(track_or_episode) is Metadata_pb2.Episode:
|
||||
self.track = None
|
||||
self.episode = track_or_episode
|
||||
else:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from librespot.common.Utils import Utils
|
||||
from librespot.proto import Metadata
|
||||
from librespot.proto import Metadata_pb2
|
||||
|
||||
|
||||
class StreamId:
|
||||
|
@ -7,8 +7,8 @@ class StreamId:
|
|||
episode_gid: bytes = None
|
||||
|
||||
def __init__(self,
|
||||
file: Metadata.AudioFile = None,
|
||||
episode: Metadata.Episode = None):
|
||||
file: Metadata_pb2.AudioFile = None,
|
||||
episode: Metadata_pb2.Episode = None):
|
||||
if file is None and episode is None:
|
||||
return
|
||||
if file is not None:
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
from librespot.audio.AbsChunkedInputStream import AbsChunkedInputStream
|
||||
from librespot.audio.AudioKeyManager import AudioKeyManager
|
||||
from librespot.audio.GeneralAudioStream import GeneralAudioStream
|
||||
from librespot.audio.GeneralWritableStream import GeneralWritableStream
|
||||
from librespot.audio.HaltListener import HaltListener
|
||||
from librespot.audio.NormalizationData import NormalizationData
|
||||
from librespot.audio.PlayableContentFeeder import PlayableContentFeeder
|
||||
from librespot.audio.StreamId import StreamId
|
||||
from librespot.audio import AbsChunkedInputStream
|
||||
from librespot.audio import AudioKeyManager
|
||||
from librespot.audio import GeneralAudioStream
|
||||
from librespot.audio import GeneralWritableStream
|
||||
from librespot.audio import HaltListener
|
||||
from librespot.audio import NormalizationData
|
||||
from librespot.audio import PlayableContentFeeder
|
||||
from librespot.audio import StreamId
|
||||
|
|
|
@ -10,23 +10,23 @@ from librespot.audio import NormalizationData
|
|||
from librespot.audio import PlayableContentFeeder
|
||||
from librespot.common import Utils
|
||||
from librespot.core import Session
|
||||
from librespot.proto import Metadata
|
||||
from librespot.proto import StorageResolve
|
||||
from librespot.proto import Metadata_pb2
|
||||
from librespot.proto import StorageResolve_pb2
|
||||
|
||||
|
||||
class CdnFeedHelper:
|
||||
_LOGGER: logging = logging.getLogger(__name__)
|
||||
|
||||
@staticmethod
|
||||
def get_url(resp: StorageResolve.StorageResolveResponse) -> str:
|
||||
def get_url(resp: StorageResolve_pb2.StorageResolveResponse) -> str:
|
||||
return random.choice(resp.cdnurl)
|
||||
|
||||
@staticmethod
|
||||
def load_track(
|
||||
session: Session,
|
||||
track: Metadata.Track,
|
||||
file: Metadata.AudioFile,
|
||||
resp_or_url: typing.Union[StorageResolve.StorageResolveResponse, str],
|
||||
track: Metadata_pb2.Track,
|
||||
file: Metadata_pb2.AudioFile,
|
||||
resp_or_url: typing.Union[StorageResolve_pb2.StorageResolveResponse, str],
|
||||
preload: bool,
|
||||
halt_listener: HaltListener,
|
||||
) -> PlayableContentFeeder.PlayableContentFeeder.LoadedStream:
|
||||
|
@ -54,7 +54,7 @@ class CdnFeedHelper:
|
|||
|
||||
@staticmethod
|
||||
def load_episode_external(
|
||||
session: Session, episode: Metadata.Episode,
|
||||
session: Session, episode: Metadata_pb2.Episode,
|
||||
halt_listener: HaltListener
|
||||
) -> PlayableContentFeeder.PlayableContentFeeder.LoadedStream:
|
||||
resp = session.client().head(episode.external_url)
|
||||
|
@ -79,9 +79,9 @@ class CdnFeedHelper:
|
|||
@staticmethod
|
||||
def load_episode(
|
||||
session: Session,
|
||||
episode: Metadata.Episode,
|
||||
file: Metadata.AudioFile,
|
||||
resp_or_url: typing.Union[StorageResolve.StorageResolveResponse, str],
|
||||
episode: Metadata_pb2.Episode,
|
||||
file: Metadata_pb2.AudioFile,
|
||||
resp_or_url: typing.Union[StorageResolve_pb2.StorageResolveResponse, str],
|
||||
halt_listener: HaltListener,
|
||||
) -> PlayableContentFeeder.PlayableContentFeeder.LoadedStream:
|
||||
if type(resp_or_url) is str:
|
||||
|
|
|
@ -17,14 +17,14 @@ from librespot.audio.decrypt import NoopAudioDecrypt
|
|||
from librespot.audio.format import SuperAudioFormat
|
||||
from librespot.audio.storage import ChannelManager
|
||||
from librespot.common import Utils
|
||||
from librespot.proto import StorageResolve
|
||||
from librespot.proto import StorageResolve_pb2
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from librespot.audio.decrypt.AudioDecrypt import AudioDecrypt
|
||||
from librespot.audio.HaltListener import HaltListener
|
||||
from librespot.cache.CacheManager import CacheManager
|
||||
from librespot.core.Session import Session
|
||||
from librespot.proto import Metadata
|
||||
from librespot.proto import Metadata_pb2
|
||||
|
||||
|
||||
class CdnManager:
|
||||
|
@ -50,7 +50,7 @@ class CdnManager:
|
|||
|
||||
return body
|
||||
|
||||
def stream_external_episode(self, episode: Metadata.Episode,
|
||||
def stream_external_episode(self, episode: Metadata_pb2.Episode,
|
||||
external_url: str,
|
||||
halt_listener: HaltListener):
|
||||
return CdnManager.Streamer(
|
||||
|
@ -65,7 +65,7 @@ class CdnManager:
|
|||
|
||||
def stream_file(
|
||||
self,
|
||||
file: Metadata.AudioFile,
|
||||
file: Metadata_pb2.AudioFile,
|
||||
key: bytes,
|
||||
url: str,
|
||||
halt_listener: HaltListener,
|
||||
|
@ -96,9 +96,9 @@ class CdnManager:
|
|||
if body is None:
|
||||
raise IOError("Response body is empty!")
|
||||
|
||||
proto = StorageResolve.StorageResolveResponse()
|
||||
proto = StorageResolve_pb2.StorageResolveResponse()
|
||||
proto.ParseFromString(body)
|
||||
if proto.result == StorageResolve.StorageResolveResponse.Result.CDN:
|
||||
if proto.result == StorageResolve_pb2.StorageResolveResponse.Result.CDN:
|
||||
url = random.choice(proto.cdnurl)
|
||||
self._LOGGER.debug("Fetched CDN url for {}: {}".format(
|
||||
Utils.bytes_to_hex(file_id), url))
|
||||
|
|
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||
import enum
|
||||
import typing
|
||||
|
||||
from librespot.proto.Metadata import AudioFile
|
||||
from librespot.proto.Metadata_pb2 import AudioFile
|
||||
|
||||
|
||||
class AudioQuality(enum.Enum):
|
||||
|
|
|
@ -3,10 +3,10 @@ from __future__ import annotations
|
|||
import typing
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from librespot.proto import Metadata
|
||||
from librespot.proto import Metadata_pb2
|
||||
|
||||
|
||||
class AudioQualityPicker:
|
||||
def get_file(self,
|
||||
files: typing.List[Metadata.AudioFile]) -> Metadata.AudioFile:
|
||||
files: typing.List[Metadata_pb2.AudioFile]) -> Metadata_pb2.AudioFile:
|
||||
pass
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from librespot.proto import Metadata
|
||||
from librespot.proto import Metadata_pb2
|
||||
import enum
|
||||
|
||||
|
||||
|
@ -8,19 +8,19 @@ class SuperAudioFormat(enum.Enum):
|
|||
AAC = 0x02
|
||||
|
||||
@staticmethod
|
||||
def get(audio_format: Metadata.AudioFile.Format):
|
||||
if audio_format == Metadata.AudioFile.Format.OGG_VORBIS_96 or \
|
||||
audio_format == Metadata.AudioFile.Format.OGG_VORBIS_160 or \
|
||||
audio_format == Metadata.AudioFile.Format.OGG_VORBIS_320:
|
||||
def get(audio_format: Metadata_pb2.AudioFile.Format):
|
||||
if audio_format == Metadata_pb2.AudioFile.Format.OGG_VORBIS_96 or \
|
||||
audio_format == Metadata_pb2.AudioFile.Format.OGG_VORBIS_160 or \
|
||||
audio_format == Metadata_pb2.AudioFile.Format.OGG_VORBIS_320:
|
||||
return SuperAudioFormat.VORBIS
|
||||
if audio_format == Metadata.AudioFile.Format.MP3_256 or \
|
||||
audio_format == Metadata.AudioFile.Format.MP3_320 or \
|
||||
audio_format == Metadata.AudioFile.Format.MP3_160 or \
|
||||
audio_format == Metadata.AudioFile.Format.MP3_96 or \
|
||||
audio_format == Metadata.AudioFile.Format.MP3_160_ENC:
|
||||
if audio_format == Metadata_pb2.AudioFile.Format.MP3_256 or \
|
||||
audio_format == Metadata_pb2.AudioFile.Format.MP3_320 or \
|
||||
audio_format == Metadata_pb2.AudioFile.Format.MP3_160 or \
|
||||
audio_format == Metadata_pb2.AudioFile.Format.MP3_96 or \
|
||||
audio_format == Metadata_pb2.AudioFile.Format.MP3_160_ENC:
|
||||
return SuperAudioFormat.MP3
|
||||
if audio_format == Metadata.AudioFile.Format.AAC_24 or \
|
||||
audio_format == Metadata.AudioFile.Format.AAC_48 or \
|
||||
audio_format == Metadata.AudioFile.Format.AAC_24_NORM:
|
||||
if audio_format == Metadata_pb2.AudioFile.Format.AAC_24 or \
|
||||
audio_format == Metadata_pb2.AudioFile.Format.AAC_48 or \
|
||||
audio_format == Metadata_pb2.AudioFile.Format.AAC_24_NORM:
|
||||
return SuperAudioFormat.AAC
|
||||
raise RuntimeError("Unknown audio format: {}".format(audio_format))
|
||||
|
|
|
@ -35,10 +35,10 @@ from librespot.dealer import ApiClient
|
|||
from librespot.dealer import DealerClient
|
||||
from librespot.mercury import MercuryClient
|
||||
from librespot.mercury import SubListener
|
||||
from librespot.proto import Authentication
|
||||
from librespot.proto import Connect
|
||||
from librespot.proto import Keyexchange
|
||||
from librespot.proto.ExplicitContentPubsub import UserAttributesUpdate
|
||||
from librespot.proto import Authentication_pb2
|
||||
from librespot.proto import Connect_pb2
|
||||
from librespot.proto import Keyexchange_pb2
|
||||
from librespot.proto.ExplicitContentPubsub_pb2 import UserAttributesUpdate
|
||||
from librespot.standard import BytesInputStream
|
||||
from librespot.standard import Closeable
|
||||
from librespot.standard import Proxy
|
||||
|
@ -319,7 +319,7 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
_conn: Session.ConnectionHolder = None
|
||||
_cipherPair: CipherPair = None
|
||||
_receiver: Session.Receiver = None
|
||||
_apWelcome: Authentication.APWelcome = None
|
||||
_apWelcome: Authentication_pb2.APWelcome = None
|
||||
_mercuryClient: MercuryClient = None
|
||||
_audioKeyManager: AudioKeyManager = None
|
||||
_channelManager: ChannelManager = None
|
||||
|
@ -383,13 +383,13 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
|
||||
nonce = os.urandom(0x10)
|
||||
|
||||
client_hello = Keyexchange.ClientHello(
|
||||
client_hello = Keyexchange_pb2.ClientHello(
|
||||
build_info=Version.standard_build_info(),
|
||||
cryptosuites_supported=[
|
||||
Keyexchange.Cryptosuite.CRYPTO_SUITE_SHANNON
|
||||
Keyexchange_pb2.Cryptosuite.CRYPTO_SUITE_SHANNON
|
||||
],
|
||||
login_crypto_hello=Keyexchange.LoginCryptoHelloUnion(
|
||||
diffie_hellman=Keyexchange.LoginCryptoDiffieHellmanHello(
|
||||
login_crypto_hello=Keyexchange_pb2.LoginCryptoHelloUnion(
|
||||
diffie_hellman=Keyexchange_pb2.LoginCryptoDiffieHellmanHello(
|
||||
gc=self._keys.public_key_array(), server_keys_known=1), ),
|
||||
client_nonce=nonce,
|
||||
padding=bytes([0x1E]),
|
||||
|
@ -415,7 +415,7 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
buffer = self._conn.read(length - 4)
|
||||
acc.write(buffer)
|
||||
|
||||
ap_response_message = Keyexchange.APResponseMessage()
|
||||
ap_response_message = Keyexchange_pb2.APResponseMessage()
|
||||
ap_response_message.ParseFromString(buffer)
|
||||
shared_key = Utils.to_byte_array(
|
||||
self._keys.compute_shared_key(
|
||||
|
@ -453,12 +453,12 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
mac.update(acc.array())
|
||||
|
||||
challenge = mac.digest()
|
||||
client_response_plaintext = Keyexchange.ClientResponsePlaintext(
|
||||
login_crypto_response=Keyexchange.LoginCryptoResponseUnion(
|
||||
diffie_hellman=Keyexchange.LoginCryptoDiffieHellmanResponse(
|
||||
client_response_plaintext = Keyexchange_pb2.ClientResponsePlaintext(
|
||||
login_crypto_response=Keyexchange_pb2.LoginCryptoResponseUnion(
|
||||
diffie_hellman=Keyexchange_pb2.LoginCryptoDiffieHellmanResponse(
|
||||
hmac=challenge)),
|
||||
pow_response=Keyexchange.PoWResponseUnion(),
|
||||
crypto_response=Keyexchange.CryptoResponseUnion(),
|
||||
pow_response=Keyexchange_pb2.PoWResponseUnion(),
|
||||
crypto_response=Keyexchange_pb2.CryptoResponseUnion(),
|
||||
)
|
||||
|
||||
client_response_plaintext_bytes = client_response_plaintext.SerializeToString(
|
||||
|
@ -477,7 +477,7 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
| (scrap[2] << 8)
|
||||
| (scrap[3] & 0xFF))
|
||||
payload = self._conn.read(length - 4)
|
||||
failed = Keyexchange.APResponseMessage()
|
||||
failed = Keyexchange_pb2.APResponseMessage()
|
||||
failed.ParseFromString(payload)
|
||||
raise RuntimeError(failed)
|
||||
except socket.timeout:
|
||||
|
@ -493,7 +493,7 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
self._LOGGER.info("Connection successfully!")
|
||||
|
||||
def _authenticate(self,
|
||||
credentials: Authentication.LoginCredentials) -> None:
|
||||
credentials: Authentication_pb2.LoginCredentials) -> None:
|
||||
self._authenticate_partial(credentials, False)
|
||||
|
||||
with self._authLock:
|
||||
|
@ -524,16 +524,16 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
self, "hm://connect-state/v1/connect/logout")
|
||||
|
||||
def _authenticate_partial(self,
|
||||
credentials: Authentication.LoginCredentials,
|
||||
credentials: Authentication_pb2.LoginCredentials,
|
||||
remove_lock: bool) -> None:
|
||||
if self._cipherPair is None:
|
||||
raise RuntimeError("Connection not established!")
|
||||
|
||||
client_response_encrypted = Authentication.ClientResponseEncrypted(
|
||||
client_response_encrypted = Authentication_pb2.ClientResponseEncrypted(
|
||||
login_credentials=credentials,
|
||||
system_info=Authentication.SystemInfo(
|
||||
os=Authentication.Os.OS_UNKNOWN,
|
||||
cpu_family=Authentication.CpuFamily.CPU_UNKNOWN,
|
||||
system_info=Authentication_pb2.SystemInfo(
|
||||
os=Authentication_pb2.Os.OS_UNKNOWN,
|
||||
cpu_family=Authentication_pb2.CpuFamily.CPU_UNKNOWN,
|
||||
system_information_string=Version.system_info_string(),
|
||||
device_id=self._inner.device_id,
|
||||
),
|
||||
|
@ -545,7 +545,7 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
|
||||
packet = self._cipherPair.receive_encoded(self._conn)
|
||||
if packet.is_cmd(Packet.Type.ap_welcome):
|
||||
self._apWelcome = Authentication.APWelcome()
|
||||
self._apWelcome = Authentication_pb2.APWelcome()
|
||||
self._apWelcome.ParseFromString(packet.payload)
|
||||
|
||||
self._receiver = Session.Receiver(self)
|
||||
|
@ -567,7 +567,7 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
|
||||
if self._inner.conf.store_credentials:
|
||||
reusable = self._apWelcome.reusable_auth_credentials
|
||||
reusable_type = Authentication.AuthenticationType.Name(
|
||||
reusable_type = Authentication_pb2.AuthenticationType.Name(
|
||||
self._apWelcome.reusable_auth_credentials_type)
|
||||
|
||||
if self._inner.conf.stored_credentials_file is None:
|
||||
|
@ -584,7 +584,7 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
)
|
||||
|
||||
elif packet.is_cmd(Packet.Type.auth_failure):
|
||||
ap_login_failed = Keyexchange.APLoginFailed()
|
||||
ap_login_failed = Keyexchange_pb2.APLoginFailed()
|
||||
ap_login_failed.ParseFromString(packet.payload)
|
||||
raise Session.SpotifyAuthenticationException(ap_login_failed)
|
||||
else:
|
||||
|
@ -748,7 +748,7 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
def username(self) -> str:
|
||||
return self.ap_welcome().canonical_username
|
||||
|
||||
def ap_welcome(self) -> Authentication.APWelcome:
|
||||
def ap_welcome(self) -> Authentication_pb2.APWelcome:
|
||||
self._wait_auth_lock()
|
||||
if self._apWelcome is None:
|
||||
raise RuntimeError("Session isn't authenticated!")
|
||||
|
@ -773,7 +773,7 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
def preferred_locale(self) -> str:
|
||||
return self._inner.preferred_locale
|
||||
|
||||
def device_type(self) -> Connect.DeviceType:
|
||||
def device_type(self) -> Connect_pb2.DeviceType:
|
||||
return self._inner.device_type
|
||||
|
||||
def device_name(self) -> str:
|
||||
|
@ -795,7 +795,7 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
ApResolver.get_random_accesspoint(), self._inner.conf)
|
||||
self._connect()
|
||||
self._authenticate_partial(
|
||||
Authentication.LoginCredentials(
|
||||
Authentication_pb2.LoginCredentials(
|
||||
typ=self._apWelcome.reusable_auth_credentials_type,
|
||||
username=self._apWelcome.canonical_username,
|
||||
auth_data=self._apWelcome.reusable_auth_credentials,
|
||||
|
@ -871,7 +871,7 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
pass
|
||||
|
||||
class Inner:
|
||||
device_type: Connect.DeviceType = None
|
||||
device_type: Connect_pb2.DeviceType = None
|
||||
device_name: str = None
|
||||
device_id: str = None
|
||||
conf = None
|
||||
|
@ -879,7 +879,7 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
|
||||
def __init__(
|
||||
self,
|
||||
device_type: Connect.DeviceType,
|
||||
device_type: Connect_pb2.DeviceType,
|
||||
device_name: str,
|
||||
preferred_locale: str,
|
||||
conf: Session.Configuration,
|
||||
|
@ -896,7 +896,7 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
conf = None
|
||||
device_id = None
|
||||
device_name = "librespot-python"
|
||||
device_type = Connect.DeviceType.COMPUTER
|
||||
device_type = Connect_pb2.DeviceType.COMPUTER
|
||||
preferred_locale = "en"
|
||||
|
||||
def __init__(self, conf: Session.Configuration = None):
|
||||
|
@ -924,12 +924,12 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
return self
|
||||
|
||||
def set_device_type(
|
||||
self, device_type: Connect.DeviceType) -> Session.AbsBuilder:
|
||||
self, device_type: Connect_pb2.DeviceType) -> Session.AbsBuilder:
|
||||
self.device_type = device_type
|
||||
return self
|
||||
|
||||
class Builder(AbsBuilder):
|
||||
login_credentials: Authentication.LoginCredentials = None
|
||||
login_credentials: Authentication_pb2.LoginCredentials = None
|
||||
|
||||
def stored(self):
|
||||
pass
|
||||
|
@ -946,8 +946,8 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
pass
|
||||
else:
|
||||
try:
|
||||
self.login_credentials = Authentication.LoginCredentials(
|
||||
typ=Authentication.AuthenticationType.Value(
|
||||
self.login_credentials = Authentication_pb2.LoginCredentials(
|
||||
typ=Authentication_pb2.AuthenticationType.Value(
|
||||
obj["type"]),
|
||||
username=obj["username"],
|
||||
auth_data=base64.b64decode(obj["credentials"]),
|
||||
|
@ -958,9 +958,9 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
return self
|
||||
|
||||
def user_pass(self, username: str, password: str) -> Session.Builder:
|
||||
self.login_credentials = Authentication.LoginCredentials(
|
||||
self.login_credentials = Authentication_pb2.LoginCredentials(
|
||||
username=username,
|
||||
typ=Authentication.AuthenticationType.AUTHENTICATION_USER_PASS,
|
||||
typ=Authentication_pb2.AuthenticationType.AUTHENTICATION_USER_PASS,
|
||||
auth_data=password.encode(),
|
||||
)
|
||||
return self
|
||||
|
@ -1145,9 +1145,9 @@ class Session(Closeable, SubListener, DealerClient.MessageListener):
|
|||
)
|
||||
|
||||
class SpotifyAuthenticationException(Exception):
|
||||
def __init__(self, login_failed: Keyexchange.APLoginFailed):
|
||||
def __init__(self, login_failed: Keyexchange_pb2.APLoginFailed):
|
||||
super().__init__(
|
||||
Keyexchange.ErrorCode.Name(login_failed.error_code))
|
||||
Keyexchange_pb2.ErrorCode.Name(login_failed.error_code))
|
||||
|
||||
class Accumulator:
|
||||
buffer: bytes = bytes()
|
||||
|
|
|
@ -9,8 +9,8 @@ from librespot.metadata import ArtistId
|
|||
from librespot.metadata import EpisodeId
|
||||
from librespot.metadata import ShowId
|
||||
from librespot.metadata import TrackId
|
||||
from librespot.proto import Connect
|
||||
from librespot.proto import Metadata
|
||||
from librespot.proto import Connect_pb2
|
||||
from librespot.proto import Metadata_pb2
|
||||
from librespot.standard import Closeable
|
||||
|
||||
|
||||
|
@ -53,7 +53,7 @@ class ApiClient(Closeable):
|
|||
return resp
|
||||
|
||||
def put_connect_state(self, connection_id: str,
|
||||
proto: Connect.PutStateRequest) -> None:
|
||||
proto: Connect_pb2.PutStateRequest) -> None:
|
||||
resp = self.send(
|
||||
"PUT",
|
||||
"/connect-state/v1/devices/{}".format(self._session.device_id()),
|
||||
|
@ -72,7 +72,7 @@ class ApiClient(Closeable):
|
|||
self._LOGGER.warning("PUT state returned {}. headers: {}".format(
|
||||
resp.status_code, resp.headers))
|
||||
|
||||
def get_metadata_4_track(self, track: TrackId) -> Metadata.Track:
|
||||
def get_metadata_4_track(self, track: TrackId) -> Metadata_pb2.Track:
|
||||
resp = self.send("GET", "/metadata/4/track/{}".format(track.hex_id()),
|
||||
None, None)
|
||||
ApiClient.StatusCodeException.check_status(resp)
|
||||
|
@ -80,11 +80,11 @@ class ApiClient(Closeable):
|
|||
body = resp.content
|
||||
if body is None:
|
||||
raise RuntimeError()
|
||||
proto = Metadata.Track()
|
||||
proto = Metadata_pb2.Track()
|
||||
proto.ParseFromString(body)
|
||||
return proto
|
||||
|
||||
def get_metadata_4_episode(self, episode: EpisodeId) -> Metadata.Episode:
|
||||
def get_metadata_4_episode(self, episode: EpisodeId) -> Metadata_pb2.Episode:
|
||||
resp = self.send("GET",
|
||||
"/metadata/4/episode/{}".format(episode.hex_id()),
|
||||
None, None)
|
||||
|
@ -93,11 +93,11 @@ class ApiClient(Closeable):
|
|||
body = resp.content
|
||||
if body is None:
|
||||
raise IOError()
|
||||
proto = Metadata.Episode()
|
||||
proto = Metadata_pb2.Episode()
|
||||
proto.ParseFromString(body)
|
||||
return proto
|
||||
|
||||
def get_metadata_4_album(self, album: AlbumId) -> Metadata.Album:
|
||||
def get_metadata_4_album(self, album: AlbumId) -> Metadata_pb2.Album:
|
||||
resp = self.send("GET", "/metadata/4/album/{}".format(album.hex_id()),
|
||||
None, None)
|
||||
ApiClient.StatusCodeException.check_status(resp)
|
||||
|
@ -105,11 +105,11 @@ class ApiClient(Closeable):
|
|||
body = resp.content
|
||||
if body is None:
|
||||
raise IOError()
|
||||
proto = Metadata.Album()
|
||||
proto = Metadata_pb2.Album()
|
||||
proto.ParseFromString(body)
|
||||
return proto
|
||||
|
||||
def get_metadata_4_artist(self, artist: ArtistId) -> Metadata.Artist:
|
||||
def get_metadata_4_artist(self, artist: ArtistId) -> Metadata_pb2.Artist:
|
||||
resp = self.send("GET",
|
||||
"/metadata/4/artist/{}".format(artist.hex_id()), None,
|
||||
None)
|
||||
|
@ -118,11 +118,11 @@ class ApiClient(Closeable):
|
|||
body = resp.content
|
||||
if body is None:
|
||||
raise IOError()
|
||||
proto = Metadata.Artist()
|
||||
proto = Metadata_pb2.Artist()
|
||||
proto.ParseFromString(body)
|
||||
return proto
|
||||
|
||||
def get_metadata_4_show(self, show: ShowId) -> Metadata.Show:
|
||||
def get_metadata_4_show(self, show: ShowId) -> Metadata_pb2.Show:
|
||||
resp = self.send("GET", "/metadata/4/show/{}".format(show.hex_id()),
|
||||
None, None)
|
||||
ApiClient.StatusCodeException.check_status(resp)
|
||||
|
@ -130,7 +130,7 @@ class ApiClient(Closeable):
|
|||
body = resp.content
|
||||
if body is None:
|
||||
raise IOError()
|
||||
proto = Metadata.Show()
|
||||
proto = Metadata_pb2.Show()
|
||||
proto.ParseFromString(body)
|
||||
return proto
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ from librespot.crypto import Packet
|
|||
from librespot.mercury import JsonMercuryRequest
|
||||
from librespot.mercury import RawMercuryRequest
|
||||
from librespot.mercury import SubListener
|
||||
from librespot.proto import Mercury
|
||||
from librespot.proto import Pubsub
|
||||
from librespot.proto import Mercury_pb2
|
||||
from librespot.proto import Pubsub_pb2
|
||||
from librespot.standard import BytesInputStream
|
||||
from librespot.standard import BytesOutputStream
|
||||
from librespot.standard import Closeable
|
||||
|
@ -42,7 +42,7 @@ class MercuryClient(PacketsReceiver.PacketsReceiver, Closeable):
|
|||
|
||||
if len(response.payload) > 0:
|
||||
for payload in response.payload:
|
||||
sub = Pubsub.Subscription()
|
||||
sub = Pubsub_pb2.Subscription()
|
||||
sub.ParseFromString(payload)
|
||||
self._subscriptions.append(
|
||||
MercuryClient.InternalSubListener(sub.uri, listener, True))
|
||||
|
@ -150,7 +150,7 @@ class MercuryClient(PacketsReceiver.PacketsReceiver, Closeable):
|
|||
|
||||
self._partials.pop(seq)
|
||||
|
||||
header = Mercury.Header()
|
||||
header = Mercury_pb2.Header()
|
||||
header.ParseFromString(partial[0])
|
||||
|
||||
resp = MercuryClient.Response(header, partial)
|
||||
|
@ -257,7 +257,7 @@ class MercuryClient(PacketsReceiver.PacketsReceiver, Closeable):
|
|||
payload: typing.List[bytes]
|
||||
status_code: int
|
||||
|
||||
def __init__(self, header: Mercury.Header,
|
||||
def __init__(self, header: Mercury_pb2.Header,
|
||||
payload: typing.List[bytes]):
|
||||
self.uri = header.uri
|
||||
self.status_code = header.status_code
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import typing
|
||||
|
||||
from librespot.proto import Mercury
|
||||
from librespot.proto import Mercury_pb2
|
||||
|
||||
|
||||
class RawMercuryRequest:
|
||||
header: Mercury.Header
|
||||
header: Mercury_pb2.Header
|
||||
payload: typing.List[bytes]
|
||||
|
||||
def __init__(self, header: Mercury.Header, payload: typing.List[bytes]):
|
||||
def __init__(self, header: Mercury_pb2.Header, payload: typing.List[bytes]):
|
||||
self.header = header
|
||||
self.payload = payload
|
||||
|
||||
|
@ -61,7 +61,7 @@ class RawMercuryRequest:
|
|||
return self
|
||||
|
||||
def add_user_field(self,
|
||||
field: Mercury.UserField = None,
|
||||
field: Mercury_pb2.UserField = None,
|
||||
key: str = None,
|
||||
value: str = None):
|
||||
if field is None and (key is None or value is None):
|
||||
|
@ -74,7 +74,7 @@ class RawMercuryRequest:
|
|||
self.header_dict["user_fields"].append(field)
|
||||
if key is not None and value is not None:
|
||||
self.header_dict["user_fields"].append(
|
||||
Mercury.UserField(key=key, value=value.encode()))
|
||||
Mercury_pb2.UserField(key=key, value=value.encode()))
|
||||
return self
|
||||
|
||||
def add_payload_part(self, part: bytes):
|
||||
|
@ -85,5 +85,5 @@ class RawMercuryRequest:
|
|||
return self.add_payload_part(msg)
|
||||
|
||||
def build(self):
|
||||
return RawMercuryRequest(Mercury.Header(**self.header_dict),
|
||||
return RawMercuryRequest(Mercury_pb2.Header(**self.header_dict),
|
||||
self.payload)
|
||||
|
|
|
@ -4,7 +4,7 @@ import re
|
|||
|
||||
from librespot.common import Base62
|
||||
from librespot.common import Utils
|
||||
from librespot.proto.ContextTrack import ContextTrack
|
||||
from librespot.proto.ContextTrack_pb2 import ContextTrack
|
||||
|
||||
|
||||
class SpotifyId:
|
||||
|
|
|
@ -7,11 +7,11 @@ 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
|
||||
from librespot.proto.Player import ContextPlayerOptions
|
||||
from librespot.proto.Player import PlayerState
|
||||
from librespot.proto.Player import Restrictions
|
||||
from librespot.proto.Player import Suppressions
|
||||
from librespot.proto import Connect_pb2
|
||||
from librespot.proto.Player_pb2 import ContextPlayerOptions
|
||||
from librespot.proto.Player_pb2 import PlayerState
|
||||
from librespot.proto.Player_pb2 import Restrictions
|
||||
from librespot.proto.Player_pb2 import Suppressions
|
||||
|
||||
|
||||
class StateWrapper(DeviceStateHandler.Listener, DealerClient.MessageListener):
|
||||
|
@ -52,7 +52,7 @@ class StateWrapper(DeviceStateHandler.Listener, DealerClient.MessageListener):
|
|||
self._device.add_listener(listener)
|
||||
|
||||
def ready(self) -> None:
|
||||
self._device.update_state(Connect.PutStateReason.NEW_DEVICE, 0,
|
||||
self._device.update_state(Connect_pb2.PutStateReason.NEW_DEVICE, 0,
|
||||
self._state)
|
||||
|
||||
def on_message(self, uri: str, headers: typing.Dict[str, str],
|
||||
|
|
|
@ -6,7 +6,7 @@ import typing
|
|||
from librespot.audio.decoders.AudioQuality import AudioQuality
|
||||
from librespot.audio.format.AudioQualityPicker import AudioQualityPicker
|
||||
from librespot.audio.format.SuperAudioFormat import SuperAudioFormat
|
||||
from librespot.proto import Metadata
|
||||
from librespot.proto import Metadata_pb2
|
||||
|
||||
|
||||
class VorbisOnlyAudioQuality(AudioQualityPicker):
|
||||
|
@ -17,7 +17,7 @@ class VorbisOnlyAudioQuality(AudioQualityPicker):
|
|||
self.preferred = preferred
|
||||
|
||||
@staticmethod
|
||||
def get_vorbis_file(files: typing.List[Metadata.AudioFile]):
|
||||
def get_vorbis_file(files: typing.List[Metadata_pb2.AudioFile]):
|
||||
for file in files:
|
||||
if (hasattr(file, "format") and SuperAudioFormat.get(file.format)
|
||||
== SuperAudioFormat.VORBIS):
|
||||
|
@ -25,13 +25,13 @@ class VorbisOnlyAudioQuality(AudioQualityPicker):
|
|||
|
||||
return None
|
||||
|
||||
def get_file(self, files: typing.List[Metadata.AudioFile]):
|
||||
matches: typing.List[Metadata.AudioFile] = self.preferred.get_matches(
|
||||
def get_file(self, files: typing.List[Metadata_pb2.AudioFile]):
|
||||
matches: typing.List[Metadata_pb2.AudioFile] = self.preferred.get_matches(
|
||||
files)
|
||||
vorbis: Metadata.AudioFile = VorbisOnlyAudioQuality.get_vorbis_file(
|
||||
vorbis: Metadata_pb2.AudioFile = VorbisOnlyAudioQuality.get_vorbis_file(
|
||||
matches)
|
||||
if vorbis is None:
|
||||
vorbis: Metadata.AudioFile = VorbisOnlyAudioQuality.get_vorbis_file(
|
||||
vorbis: Metadata_pb2.AudioFile = VorbisOnlyAudioQuality.get_vorbis_file(
|
||||
files)
|
||||
if vorbis is not None:
|
||||
self._LOGGER.warning(
|
||||
|
|
|
@ -11,16 +11,16 @@ import urllib.parse
|
|||
from librespot.common import Utils
|
||||
from librespot.core import Session
|
||||
from librespot.player import PlayerConfiguration
|
||||
from librespot.proto import Connect
|
||||
from librespot.proto import Player
|
||||
from librespot.proto import Connect_pb2
|
||||
from librespot.proto import Player_pb2
|
||||
|
||||
|
||||
class DeviceStateHandler:
|
||||
_LOGGER: logging = logging.getLogger(__name__)
|
||||
_session: Session = None
|
||||
_deviceInfo: Connect.DeviceInfo = None
|
||||
_deviceInfo: Connect_pb2.DeviceInfo = None
|
||||
_listeners: typing.List[DeviceStateHandler.Listener] = []
|
||||
_putState: Connect.PutStateRequest = None
|
||||
_putState: Connect_pb2.PutStateRequest = None
|
||||
_putStateWorker: concurrent.futures.ThreadPoolExecutor = (
|
||||
concurrent.futures.ThreadPoolExecutor())
|
||||
_connectionId: str = None
|
||||
|
@ -28,7 +28,7 @@ class DeviceStateHandler:
|
|||
def __init__(self, session: Session, player, conf: PlayerConfiguration):
|
||||
self._session = session
|
||||
self._deviceInfo = None
|
||||
self._putState = Connect.PutStateRequest()
|
||||
self._putState = Connect_pb2.PutStateRequest()
|
||||
|
||||
def _update_connection_id(self, newer: str) -> None:
|
||||
newer = urllib.parse.unquote(newer, "UTF-8")
|
||||
|
@ -48,9 +48,9 @@ class DeviceStateHandler:
|
|||
|
||||
def update_state(
|
||||
self,
|
||||
reason: Connect.PutStateReason,
|
||||
reason: Connect_pb2.PutStateReason,
|
||||
player_time: int,
|
||||
state: Player.PlayerState,
|
||||
state: Player_pb2.PlayerState,
|
||||
):
|
||||
if self._connectionId is None:
|
||||
raise TypeError()
|
||||
|
@ -67,7 +67,7 @@ class DeviceStateHandler:
|
|||
|
||||
self._putStateWorker.submit(self._put_connect_state, self._putState)
|
||||
|
||||
def _put_connect_state(self, req: Connect.PutStateRequest):
|
||||
def _put_connect_state(self, req: Connect_pb2.PutStateRequest):
|
||||
self._session.api().put_connect_state(self._connectionId, req)
|
||||
self._LOGGER.info("Put state. ts: {}, connId: {}, reason: {}".format(
|
||||
req.client_side_timestamp,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: canvaz.proto
|
||||
"""Generated protocol buffer code."""
|
||||
import CanvazMeta as canvaz__meta__pb2
|
||||
import CanvazMeta_pb2 as canvaz__meta__pb2
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
|
@ -11,7 +11,7 @@ from google.protobuf import symbol_database as _symbol_database
|
|||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
import librespot.proto.Player as player__pb2
|
||||
import librespot.proto.Player_pb2 as player__pb2
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
name='connect.proto',
|
|
@ -2,7 +2,7 @@
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: context_page.proto
|
||||
"""Generated protocol buffer code."""
|
||||
import ContextTrack as context__track__pb2
|
||||
import ContextTrack_pb2 as context__track__pb2
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
|
@ -2,8 +2,8 @@
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: context.proto
|
||||
"""Generated protocol buffer code."""
|
||||
import ContextPage as context__page__pb2
|
||||
import Restrictions as restrictions__pb2
|
||||
import ContextPage_pb2 as context__page__pb2
|
||||
import Restrictions_pb2 as restrictions__pb2
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
|
@ -2,7 +2,7 @@
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: playback.proto
|
||||
"""Generated protocol buffer code."""
|
||||
import ContextTrack as context__track__pb2
|
||||
import ContextTrack_pb2 as context__track__pb2
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
|
@ -2,7 +2,7 @@
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: queue.proto
|
||||
"""Generated protocol buffer code."""
|
||||
import ContextTrack as context__track__pb2
|
||||
import ContextTrack_pb2 as context__track__pb2
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
|
@ -2,9 +2,9 @@
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: session.proto
|
||||
"""Generated protocol buffer code."""
|
||||
import Context as context__pb2
|
||||
import ContextPlayerOptions as context__player__options__pb2
|
||||
import PlayOrigin as play__origin__pb2
|
||||
import Context_pb2 as context__pb2
|
||||
import ContextPlayerOptions_pb2 as context__player__options__pb2
|
||||
import PlayOrigin_pb2 as play__origin__pb2
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
|
@ -2,10 +2,10 @@
|
|||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: transfer_state.proto
|
||||
"""Generated protocol buffer code."""
|
||||
import ContextPlayerOptions as context__player__options__pb2
|
||||
import Playback as playback__pb2
|
||||
import Queue as queue__pb2
|
||||
import Session as session__pb2
|
||||
import ContextPlayerOptions_pb2 as context__player__options__pb2
|
||||
import Playback_pb2 as playback__pb2
|
||||
import Queue_pb2 as queue__pb2
|
||||
import Session_pb2 as session__pb2
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
Loading…
Reference in New Issue