Restyled by black

This commit is contained in:
Restyled.io 2021-05-22 01:26:33 +00:00
parent 58e8ba2347
commit 544c57ff1f
52 changed files with 3303 additions and 2729 deletions

View File

@ -12,6 +12,7 @@
# import sys # import sys
# sys.path.insert(0, os.path.abspath('.')) # sys.path.insert(0, os.path.abspath('.'))
from recommonmark.transform import AutoStructify from recommonmark.transform import AutoStructify
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = "librespot-python" project = "librespot-python"
@ -55,7 +56,11 @@ source_parsers = {
def setup(app): def setup(app):
app.add_config_value("recommonmark_config", { app.add_config_value(
"auto_toc_tree_section": "Contents", "recommonmark_config",
}, True) {
"auto_toc_tree_section": "Contents",
},
True,
)
app.add_transform(AutoStructify) app.add_transform(AutoStructify)

View File

@ -33,15 +33,18 @@ def client():
return return
if (args[0] == "p" or args[0] == "play") and len(args) == 2: if (args[0] == "p" or args[0] == "play") and len(args) == 2:
track_uri_search = re.search( track_uri_search = re.search(
r"^spotify:track:(?P<TrackID>[0-9a-zA-Z]{22})$", args[1]) r"^spotify:track:(?P<TrackID>[0-9a-zA-Z]{22})$", args[1]
)
track_url_search = re.search( track_url_search = re.search(
r"^(https?://)?open.spotify.com/track/(?P<TrackID>[0-9a-zA-Z]{22})(\?si=.+?)?$", r"^(https?://)?open.spotify.com/track/(?P<TrackID>[0-9a-zA-Z]{22})(\?si=.+?)?$",
args[1], args[1],
) )
if track_uri_search is not None or track_url_search is not None: if track_uri_search is not None or track_url_search is not None:
track_id_str = (track_uri_search track_id_str = (
if track_uri_search is not None else track_uri_search
track_url_search).group("TrackID") if track_uri_search is not None
else track_url_search
).group("TrackID")
play(track_id_str) play(track_id_str)
wait() wait()
if args[0] == "q" or args[0] == "quality": if args[0] == "q" or args[0] == "quality":
@ -61,22 +64,20 @@ def client():
token = session.tokens().get("user-read-email") token = session.tokens().get("user-read-email")
resp = requests.get( resp = requests.get(
"https://api.spotify.com/v1/search", "https://api.spotify.com/v1/search",
{ {"limit": "5", "offset": "0", "q": cmd[2:], "type": "track"},
"limit": "5",
"offset": "0",
"q": cmd[2:],
"type": "track"
},
headers={"Authorization": "Bearer %s" % token}, headers={"Authorization": "Bearer %s" % token},
) )
i = 1 i = 1
tracks = resp.json()["tracks"]["items"] tracks = resp.json()["tracks"]["items"]
for track in tracks: for track in tracks:
print("%d, %s | %s" % ( print(
i, "%d, %s | %s"
track["name"], % (
",".join([artist["name"] for artist in track["artists"]]), i,
)) track["name"],
",".join([artist["name"] for artist in track["artists"]]),
)
)
i += 1 i += 1
position = -1 position = -1
while True: while True:
@ -114,7 +115,8 @@ def login():
def play(track_id_str: str): def play(track_id_str: str):
track_id = TrackId.from_base62(track_id_str) track_id = TrackId.from_base62(track_id_str)
stream = session.content_feeder().load( stream = session.content_feeder().load(
track_id, VorbisOnlyAudioQuality(AudioQuality.VERY_HIGH), False, None) track_id, VorbisOnlyAudioQuality(AudioQuality.VERY_HIGH), False, None
)
ffplay = subprocess.Popen( ffplay = subprocess.Popen(
["ffplay", "-"], ["ffplay", "-"],
stdin=subprocess.PIPE, stdin=subprocess.PIPE,
@ -129,11 +131,13 @@ def play(track_id_str: str):
def splash(): def splash():
print("=================================\n" print(
"| Librespot-Python Player |\n" "=================================\n"
"| |\n" "| Librespot-Python Player |\n"
"| by kokarare1212 |\n" "| |\n"
"=================================\n\n\n") "| by kokarare1212 |\n"
"=================================\n\n\n"
)
def main(): def main():

View File

@ -22,8 +22,7 @@ class ZeroconfServer(Closeable):
__keys: DiffieHellman __keys: DiffieHellman
__inner: ZeroconfServer.Inner __inner: ZeroconfServer.Inner
def __init__(self, inner: ZeroconfServer.Inner, listen_port: int, def __init__(self, inner: ZeroconfServer.Inner, listen_port: int, listen_all: bool):
listen_all: bool):
self.__inner = inner self.__inner = inner
self.__keys = DiffieHellman() self.__keys = DiffieHellman()
@ -77,13 +76,15 @@ class ZeroconfServer(Closeable):
self.conf = conf self.conf = conf
self.device_type = device_type self.device_type = device_type
self.device_name = device_name self.device_name = device_name
self.device_id = (device_id if device_id is not None else self.device_id = (
Utils.random_hex_string(40)) device_id if device_id is not None else Utils.random_hex_string(40)
)
class HttpRunner(Runnable, Closeable): class HttpRunner(Runnable, Closeable):
__sock: socket __sock: socket
__executorService: concurrent.futures.ThreadPoolExecutor = ( __executorService: concurrent.futures.ThreadPoolExecutor = (
concurrent.futures.ThreadPoolExecutor()) concurrent.futures.ThreadPoolExecutor()
)
__shouldStop: bool = False __shouldStop: bool = False
def __init__(self, port: int): def __init__(self, port: int):

View File

@ -22,9 +22,7 @@ class AbsChunkedInputStream(InputStream, HaltListener):
_decoded_length: int = 0 _decoded_length: int = 0
def __init__(self, retry_on_chunk_error: bool): def __init__(self, retry_on_chunk_error: bool):
self.retries: typing.Final[typing.List[int]] = [ self.retries: typing.Final[typing.List[int]] = [0 for _ in range(self.chunks())]
0 for _ in range(self.chunks())
]
self.retry_on_chunk_error = retry_on_chunk_error self.retry_on_chunk_error = retry_on_chunk_error
def is_closed(self) -> bool: def is_closed(self) -> bool:
@ -109,10 +107,13 @@ class AbsChunkedInputStream(InputStream, HaltListener):
self.request_chunk_from_stream(chunk) self.request_chunk_from_stream(chunk)
self.requested_chunks()[chunk] = True self.requested_chunks()[chunk] = True
for i in range(chunk + 1, for i in range(
min(self.chunks() - 1, chunk + self.preload_ahead) + 1): chunk + 1, min(self.chunks() - 1, chunk + self.preload_ahead) + 1
if (self.requested_chunks()[i] ):
and self.retries[i] < self.preload_chunk_retries): if (
self.requested_chunks()[i]
and self.retries[i] < self.preload_chunk_retries
):
self.request_chunk_from_stream(i) self.request_chunk_from_stream(i)
self.requested_chunks()[chunk] = True self.requested_chunks()[chunk] = True
@ -146,10 +147,7 @@ class AbsChunkedInputStream(InputStream, HaltListener):
self.check_availability(chunk, True, True) self.check_availability(chunk, True, True)
def read(self, def read(self, b: bytearray = None, offset: int = None, length: int = None) -> int:
b: bytearray = None,
offset: int = None,
length: int = None) -> int:
if b is None and offset is None and length is None: if b is None and offset is None and length is None:
return self.internal_read() return self.internal_read()
if not (b is not None and offset is not None and length is not None): if not (b is not None and offset is not None and length is not None):
@ -159,8 +157,9 @@ class AbsChunkedInputStream(InputStream, HaltListener):
raise IOError("Stream is closed!") raise IOError("Stream is closed!")
if offset < 0 or length < 0 or length > len(b) - offset: if offset < 0 or length < 0 or length > len(b) - offset:
raise IndexError("offset: {}, length: {}, buffer: {}".format( raise IndexError(
offset, length, len(b))) "offset: {}, length: {}, buffer: {}".format(offset, length, len(b))
)
elif length == 0: elif length == 0:
return 0 return 0
@ -175,8 +174,7 @@ class AbsChunkedInputStream(InputStream, HaltListener):
self.check_availability(chunk, True, False) self.check_availability(chunk, True, False)
copy = min(len(self.buffer()[chunk]) - chunk_off, length - i) copy = min(len(self.buffer()[chunk]) - chunk_off, length - i)
b[offset + 0:copy] = self.buffer()[chunk][chunk_off:chunk_off + b[offset + 0 : copy] = self.buffer()[chunk][chunk_off : chunk_off + copy]
copy]
i += copy i += copy
self._pos += copy self._pos += copy
@ -224,4 +222,5 @@ class AbsChunkedInputStream(InputStream, HaltListener):
@staticmethod @staticmethod
def from_stream_error(stream_error: int): def from_stream_error(stream_error: int):
return AbsChunkedInputStream.ChunkException( return AbsChunkedInputStream.ChunkException(
"Failed due to stream error, code: {}".format(stream_error)) "Failed due to stream error, code: {}".format(stream_error)
)

View File

@ -25,10 +25,7 @@ class AudioKeyManager(PacketsReceiver):
def __init__(self, session: Session): def __init__(self, session: Session):
self._session = session self._session = session
def get_audio_key(self, def get_audio_key(self, gid: bytes, file_id: bytes, retry: bool = True) -> bytes:
gid: bytes,
file_id: bytes,
retry: bool = True) -> bytes:
seq: int seq: int
with self._seqHolderLock: with self._seqHolderLock:
seq = self._seqHolder seq = self._seqHolder
@ -51,8 +48,9 @@ class AudioKeyManager(PacketsReceiver):
return self.get_audio_key(gid, file_id, False) return self.get_audio_key(gid, file_id, False)
raise RuntimeError( raise RuntimeError(
"Failed fetching audio key! gid: {}, fileId: {}".format( "Failed fetching audio key! gid: {}, fileId: {}".format(
Utils.Utils.bytes_to_hex(gid), Utils.Utils.bytes_to_hex(gid), Utils.Utils.bytes_to_hex(file_id)
Utils.Utils.bytes_to_hex(file_id))) )
)
return key return key
@ -62,8 +60,7 @@ class AudioKeyManager(PacketsReceiver):
callback = self._callbacks.get(seq) callback = self._callbacks.get(seq)
if callback is None: if callback is None:
self._LOGGER.warning( self._LOGGER.warning("Couldn't find callback for seq: {}".format(seq))
"Couldn't find callback for seq: {}".format(seq))
return return
if packet.is_cmd(Packet.Type.aes_key): if packet.is_cmd(Packet.Type.aes_key):
@ -75,7 +72,9 @@ class AudioKeyManager(PacketsReceiver):
else: else:
self._LOGGER.warning( self._LOGGER.warning(
"Couldn't handle packet, cmd: {}, length: {}".format( "Couldn't handle packet, cmd: {}, length: {}".format(
packet.cmd, len(packet.payload))) packet.cmd, len(packet.payload)
)
)
class Callback: class Callback:
def key(self, key: bytes) -> None: def key(self, key: bytes) -> None:
@ -99,15 +98,15 @@ class AudioKeyManager(PacketsReceiver):
def error(self, code: int) -> None: def error(self, code: int) -> None:
self._audioKeyManager._LOGGER.fatal( self._audioKeyManager._LOGGER.fatal(
"Audio key error, code: {}".format(code)) "Audio key error, code: {}".format(code)
)
with self.reference_lock: with self.reference_lock:
self.reference.put(None) self.reference.put(None)
self.reference_lock.notify_all() self.reference_lock.notify_all()
def wait_response(self) -> bytes: def wait_response(self) -> bytes:
with self.reference_lock: with self.reference_lock:
self.reference_lock.wait( self.reference_lock.wait(AudioKeyManager._AUDIO_KEY_REQUEST_TIMEOUT)
AudioKeyManager._AUDIO_KEY_REQUEST_TIMEOUT)
return self.reference.get(block=False) return self.reference.get(block=False)
class AesKeyException(IOError): class AesKeyException(IOError):

View File

@ -14,7 +14,9 @@ import typing
class PlayableContentFeeder: class PlayableContentFeeder:
_LOGGER: logging = logging.getLogger(__name__) _LOGGER: logging = logging.getLogger(__name__)
STORAGE_RESOLVE_INTERACTIVE: str = "/storage-resolve/files/audio/interactive/{}" STORAGE_RESOLVE_INTERACTIVE: str = "/storage-resolve/files/audio/interactive/{}"
STORAGE_RESOLVE_INTERACTIVE_PREFETCH: str = "/storage-resolve/files/audio/interactive_prefetch/{}" STORAGE_RESOLVE_INTERACTIVE_PREFETCH: str = (
"/storage-resolve/files/audio/interactive_prefetch/{}"
)
session: Session session: Session
def __init__(self, session: Session): def __init__(self, session: Session):
@ -30,20 +32,31 @@ class PlayableContentFeeder:
return None return None
def load(self, playable_id: PlayableId, def load(
audio_quality_picker: AudioQualityPicker, preload: bool, self,
halt_listener: HaltListener): playable_id: PlayableId,
audio_quality_picker: AudioQualityPicker,
preload: bool,
halt_listener: HaltListener,
):
if type(playable_id) is TrackId: if type(playable_id) is TrackId:
return self.load_track(playable_id, audio_quality_picker, preload, return self.load_track(
halt_listener) playable_id, audio_quality_picker, preload, halt_listener
)
def resolve_storage_interactive( def resolve_storage_interactive(
self, file_id: bytes, self, file_id: bytes, preload: bool
preload: bool) -> StorageResolve.StorageResolveResponse: ) -> StorageResolve.StorageResolveResponse:
resp = self.session.api().send( resp = self.session.api().send(
"GET", (self.STORAGE_RESOLVE_INTERACTIVE_PREFETCH "GET",
if preload else self.STORAGE_RESOLVE_INTERACTIVE).format( (
Utils.bytes_to_hex(file_id)), None, None) self.STORAGE_RESOLVE_INTERACTIVE_PREFETCH
if preload
else self.STORAGE_RESOLVE_INTERACTIVE
).format(Utils.bytes_to_hex(file_id)),
None,
None,
)
if resp.status_code != 200: if resp.status_code != 200:
raise RuntimeError(resp.status_code) raise RuntimeError(resp.status_code)
@ -55,13 +68,15 @@ class PlayableContentFeeder:
storage_resolve_response.ParseFromString(body) storage_resolve_response.ParseFromString(body)
return storage_resolve_response return storage_resolve_response
def load_track(self, track_id_or_track: typing.Union[TrackId, def load_track(
Metadata.Track], self,
audio_quality_picker: AudioQualityPicker, preload: bool, track_id_or_track: typing.Union[TrackId, Metadata.Track],
halt_listener: HaltListener): audio_quality_picker: AudioQualityPicker,
preload: bool,
halt_listener: HaltListener,
):
if type(track_id_or_track) is TrackId: if type(track_id_or_track) is TrackId:
original = self.session.api().get_metadata_4_track( original = self.session.api().get_metadata_4_track(track_id_or_track)
track_id_or_track)
track = self.pick_alternative_if_necessary(original) track = self.pick_alternative_if_necessary(original)
if track is None: if track is None:
raise raise
@ -69,25 +84,31 @@ class PlayableContentFeeder:
track = track_id_or_track track = track_id_or_track
file = audio_quality_picker.get_file(track.file) file = audio_quality_picker.get_file(track.file)
if file is None: if file is None:
self._LOGGER.fatal( self._LOGGER.fatal("Couldn't find any suitable audio file, available")
"Couldn't find any suitable audio file, available")
raise raise
return self.load_stream(file, track, None, preload, halt_listener) return self.load_stream(file, track, None, preload, halt_listener)
def load_stream(self, file: Metadata.AudioFile, track: Metadata.Track, def load_stream(
episode: Metadata.Episode, preload: bool, self,
halt_lister: HaltListener): file: Metadata.AudioFile,
track: Metadata.Track,
episode: Metadata.Episode,
preload: bool,
halt_lister: HaltListener,
):
if track is None and episode is None: if track is None and episode is None:
raise RuntimeError() raise RuntimeError()
resp = self.resolve_storage_interactive(file.file_id, preload) resp = self.resolve_storage_interactive(file.file_id, preload)
if resp.result == StorageResolve.StorageResolveResponse.Result.CDN: if resp.result == StorageResolve.StorageResolveResponse.Result.CDN:
if track is not None: if track is not None:
return CdnFeedHelper.load_track(self.session, track, file, return CdnFeedHelper.load_track(
resp, preload, halt_lister) self.session, track, file, resp, preload, halt_lister
return CdnFeedHelper.load_episode(self.session, episode, 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.StorageResolveResponse.Result.STORAGE:
if track is None: if track is None:
# return StorageFeedHelper # return StorageFeedHelper
@ -106,11 +127,13 @@ class PlayableContentFeeder:
normalization_data: NormalizationData normalization_data: NormalizationData
metrics: PlayableContentFeeder.Metrics metrics: PlayableContentFeeder.Metrics
def __init__(self, track_or_episode: typing.Union[Metadata.Track, def __init__(
Metadata.Episode], self,
input_stream: GeneralAudioStream, track_or_episode: typing.Union[Metadata.Track, Metadata.Episode],
normalization_data: NormalizationData, input_stream: GeneralAudioStream,
metrics: PlayableContentFeeder.Metrics): normalization_data: NormalizationData,
metrics: PlayableContentFeeder.Metrics,
):
if type(track_or_episode) is Metadata.Track: if type(track_or_episode) is Metadata.Track:
self.track = track_or_episode self.track = track_or_episode
self.episode = None self.episode = None
@ -128,10 +151,10 @@ class PlayableContentFeeder:
preloaded_audio_key: bool preloaded_audio_key: bool
audio_key_time: int audio_key_time: int
def __init__(self, file_id: bytes, preloaded_audio_key: bool, def __init__(
audio_key_time: int): self, file_id: bytes, preloaded_audio_key: bool, audio_key_time: int
self.file_id = None if file_id is None else Utils.bytes_to_hex( ):
file_id) self.file_id = None if file_id is None else Utils.bytes_to_hex(file_id)
self.preloaded_audio_key = preloaded_audio_key self.preloaded_audio_key = preloaded_audio_key
self.audio_key_time = audio_key_time self.audio_key_time = audio_key_time

View File

@ -40,8 +40,7 @@ class CdnFeedHelper:
streamer = session.cdn().stream_file(file, key, url, halt_listener) streamer = session.cdn().stream_file(file, key, url, halt_listener)
input_stream = streamer.stream() input_stream = streamer.stream()
normalization_data = NormalizationData.NormalizationData.read( normalization_data = NormalizationData.NormalizationData.read(input_stream)
input_stream)
if input_stream.skip(0xA7) != 0xA7: if input_stream.skip(0xA7) != 0xA7:
raise IOError("Couldn't skip 0xa7 bytes!") raise IOError("Couldn't skip 0xa7 bytes!")
return PlayableContentFeeder.PlayableContentFeeder.LoadedStream( return PlayableContentFeeder.PlayableContentFeeder.LoadedStream(
@ -49,13 +48,13 @@ class CdnFeedHelper:
streamer, streamer,
normalization_data, normalization_data,
PlayableContentFeeder.PlayableContentFeeder.Metrics( PlayableContentFeeder.PlayableContentFeeder.Metrics(
file.file_id, preload, -1 if preload else audio_key_time), file.file_id, preload, -1 if preload else audio_key_time
),
) )
@staticmethod @staticmethod
def load_episode_external( def load_episode_external(
session: Session, episode: Metadata.Episode, session: Session, episode: Metadata.Episode, halt_listener: HaltListener
halt_listener: HaltListener
) -> PlayableContentFeeder.PlayableContentFeeder.LoadedStream: ) -> PlayableContentFeeder.PlayableContentFeeder.LoadedStream:
resp = session.client().head(episode.external_url) resp = session.client().head(episode.external_url)
@ -63,17 +62,18 @@ class CdnFeedHelper:
CdnFeedHelper._LOGGER.warning("Couldn't resolve redirect!") CdnFeedHelper._LOGGER.warning("Couldn't resolve redirect!")
url = resp.url url = resp.url
CdnFeedHelper._LOGGER.debug("Fetched external url for {}: {}".format( CdnFeedHelper._LOGGER.debug(
Utils.Utils.bytes_to_hex(episode.gid), url)) "Fetched external url for {}: {}".format(
Utils.Utils.bytes_to_hex(episode.gid), url
)
)
streamer = session.cdn().stream_external_episode( streamer = session.cdn().stream_external_episode(episode, url, halt_listener)
episode, url, halt_listener)
return PlayableContentFeeder.PlayableContentFeeder.LoadedStream( return PlayableContentFeeder.PlayableContentFeeder.LoadedStream(
episode, episode,
streamer, streamer,
None, None,
PlayableContentFeeder.PlayableContentFeeder.Metrics( PlayableContentFeeder.PlayableContentFeeder.Metrics(None, False, -1),
None, False, -1),
) )
@staticmethod @staticmethod
@ -102,5 +102,6 @@ class CdnFeedHelper:
streamer, streamer,
normalization_data, normalization_data,
PlayableContentFeeder.PlayableContentFeeder.Metrics( PlayableContentFeeder.PlayableContentFeeder.Metrics(
file.file_id, False, audio_key_time), file.file_id, False, audio_key_time
),
) )

View File

@ -37,9 +37,9 @@ class CdnManager:
def get_head(self, file_id: bytes): def get_head(self, file_id: bytes):
resp = self._session.client().get( resp = self._session.client().get(
self._session.get_user_attribute( self._session.get_user_attribute(
"head-files-url", "head-files-url", "https://heads-fa.spotify.com/head/{file_id}"
"https://heads-fa.spotify.com/head/{file_id}").replace( ).replace("{file_id}", Utils.bytes_to_hex(file_id))
"{file_id}", Utils.bytes_to_hex(file_id))) )
if resp.status_code != 200: if resp.status_code != 200:
raise IOError("{}".format(resp.status_code)) raise IOError("{}".format(resp.status_code))
@ -50,9 +50,9 @@ class CdnManager:
return body return body
def stream_external_episode(self, episode: Metadata.Episode, def stream_external_episode(
external_url: str, self, episode: Metadata.Episode, external_url: str, halt_listener: HaltListener
halt_listener: HaltListener): ):
return CdnManager.Streamer( return CdnManager.Streamer(
self._session, self._session,
StreamId(episode), StreamId(episode),
@ -84,7 +84,8 @@ class CdnManager:
resp = self._session.api().send( resp = self._session.api().send(
"GET", "GET",
"/storage-resolve/files/audio/interactive/{}".format( "/storage-resolve/files/audio/interactive/{}".format(
Utils.bytes_to_hex(file_id)), Utils.bytes_to_hex(file_id)
),
None, None,
None, None,
) )
@ -100,11 +101,13 @@ class CdnManager:
proto.ParseFromString(body) proto.ParseFromString(body)
if proto.result == StorageResolve.StorageResolveResponse.Result.CDN: if proto.result == StorageResolve.StorageResolveResponse.Result.CDN:
url = random.choice(proto.cdnurl) url = random.choice(proto.cdnurl)
self._LOGGER.debug("Fetched CDN url for {}: {}".format( self._LOGGER.debug(
Utils.bytes_to_hex(file_id), url)) "Fetched CDN url for {}: {}".format(Utils.bytes_to_hex(file_id), url)
)
return url return url
raise CdnManager.CdnException( raise CdnManager.CdnException(
"Could not retrieve CDN url! result: {}".format(proto.result)) "Could not retrieve CDN url! result: {}".format(proto.result)
)
class CdnException(Exception): class CdnException(Exception):
pass pass
@ -158,13 +161,14 @@ class CdnManager:
continue continue
if s[0][:i] == "exp": if s[0][:i] == "exp":
expire_at = int(s[0][i + 1:]) expire_at = int(s[0][i + 1 :])
break break
if expire_at is None: if expire_at is None:
self._expiration = -1 self._expiration = -1
self._cdnManager._LOGGER.warning( self._cdnManager._LOGGER.warning(
"Invalid __token__ in CDN url: {}".format(url)) "Invalid __token__ in CDN url: {}".format(url)
)
return return
self._expiration = expire_at * 1000 self._expiration = expire_at * 1000
@ -174,8 +178,10 @@ class CdnManager:
except ValueError: except ValueError:
self._expiration = -1 self._expiration = -1
self._cdnManager._LOGGER.warning( self._cdnManager._LOGGER.warning(
"Couldn't extract expiration, invalid parameter in CDN url: " "Couldn't extract expiration, invalid parameter in CDN url: ".format(
.format(url)) url
)
)
return return
self._expiration = int(token_url.query[:i]) * 1000 self._expiration = int(token_url.query[:i]) * 1000
@ -184,8 +190,8 @@ class CdnManager:
self._expiration = -1 self._expiration = -1
class Streamer( class Streamer(
GeneralAudioStream.GeneralAudioStream, GeneralAudioStream.GeneralAudioStream,
GeneralWritableStream.GeneralWritableStream, GeneralWritableStream.GeneralWritableStream,
): ):
_session: Session = None _session: Session = None
_streamId: StreamId = None _streamId: StreamId = None
@ -218,39 +224,38 @@ class CdnManager:
self._cdnUrl = cdn_url self._cdnUrl = cdn_url
self._haltListener = halt_listener self._haltListener = halt_listener
resp = self.request(range_start=0, resp = self.request(range_start=0, range_end=ChannelManager.CHUNK_SIZE - 1)
range_end=ChannelManager.CHUNK_SIZE - 1)
content_range = resp._headers.get("Content-Range") content_range = resp._headers.get("Content-Range")
if content_range is None: if content_range is None:
raise IOError("Missing Content-Range header!") raise IOError("Missing Content-Range header!")
split = Utils.split(content_range, "/") split = Utils.split(content_range, "/")
self._size = int(split[1]) self._size = int(split[1])
self._chunks = int( self._chunks = int(math.ceil(self._size / ChannelManager.CHUNK_SIZE))
math.ceil(self._size / ChannelManager.CHUNK_SIZE))
first_chunk = resp._buffer first_chunk = resp._buffer
self._available = [False for _ in range(self._chunks)] self._available = [False for _ in range(self._chunks)]
self._requested = [False for _ in range(self._chunks)] self._requested = [False for _ in range(self._chunks)]
self._buffer = [bytearray() for _ in range(self._chunks)] self._buffer = [bytearray() for _ in range(self._chunks)]
self._internalStream = CdnManager.Streamer.InternalStream( self._internalStream = CdnManager.Streamer.InternalStream(self, False)
self, False)
self._requested[0] = True self._requested[0] = True
self.write_chunk(first_chunk, 0, False) self.write_chunk(first_chunk, 0, False)
def write_chunk(self, chunk: bytes, chunk_index: int, def write_chunk(self, chunk: bytes, chunk_index: int, cached: bool) -> None:
cached: bool) -> None:
if self._internalStream.is_closed(): if self._internalStream.is_closed():
return return
self._session._LOGGER.debug( self._session._LOGGER.debug(
"Chunk {}/{} completed, cached: {}, stream: {}".format( "Chunk {}/{} completed, cached: {}, stream: {}".format(
chunk_index + 1, self._chunks, cached, self.describe())) chunk_index + 1, self._chunks, cached, self.describe()
)
)
self._buffer[chunk_index] = self._audioDecrypt.decrypt_chunk( self._buffer[chunk_index] = self._audioDecrypt.decrypt_chunk(
chunk_index, chunk) chunk_index, chunk
)
self._internalStream.notify_chunk_available(chunk_index) self._internalStream.notify_chunk_available(chunk_index)
def stream(self) -> AbsChunkedInputStream: def stream(self) -> AbsChunkedInputStream:
@ -261,8 +266,7 @@ class CdnManager:
def describe(self) -> str: def describe(self) -> str:
if self._streamId.is_episode(): if self._streamId.is_episode():
return "episode_gid: {}".format( return "episode_gid: {}".format(self._streamId.get_episode_gid())
self._streamId.get_episode_gid())
return "file_id: {}".format(self._streamId.get_file_id()) return "file_id: {}".format(self._streamId.get_file_id())
def decrypt_time_ms(self) -> int: def decrypt_time_ms(self) -> int:
@ -272,10 +276,9 @@ class CdnManager:
resp = self.request(index) resp = self.request(index)
self.write_chunk(resp._buffer, index, False) self.write_chunk(resp._buffer, index, False)
def request(self, def request(
chunk: int = None, self, chunk: int = None, range_start: int = None, range_end: int = None
range_start: int = None, ) -> CdnManager.InternalResponse:
range_end: int = None) -> CdnManager.InternalResponse:
if chunk is None and range_start is None and range_end is None: if chunk is None and range_start is None and range_end is None:
raise TypeError() raise TypeError()
@ -285,9 +288,7 @@ class CdnManager:
resp = self._session.client().get( resp = self._session.client().get(
self._cdnUrl._url, self._cdnUrl._url,
headers={ headers={"Range": "bytes={}-{}".format(range_start, range_end)},
"Range": "bytes={}-{}".format(range_start, range_end)
},
) )
if resp.status_code != 206: if resp.status_code != 206:
@ -323,16 +324,21 @@ class CdnManager:
def request_chunk_from_stream(self, index: int) -> None: def request_chunk_from_stream(self, index: int) -> None:
self.streamer._executorService.submit( self.streamer._executorService.submit(
lambda: self.streamer.request_chunk(index)) lambda: self.streamer.request_chunk(index)
)
def stream_read_halted(self, chunk: int, _time: int) -> None: def stream_read_halted(self, chunk: int, _time: int) -> None:
if self.streamer._haltListener is not None: if self.streamer._haltListener is not None:
self.streamer._executorService.submit( self.streamer._executorService.submit(
lambda: self.streamer._haltListener.stream_read_halted( lambda: self.streamer._haltListener.stream_read_halted(
chunk, _time)) chunk, _time
)
)
def stream_read_resumed(self, chunk: int, _time: int) -> None: def stream_read_resumed(self, chunk: int, _time: int) -> None:
if self.streamer._haltListener is not None: if self.streamer._haltListener is not None:
self.streamer._executorService.submit( self.streamer._executorService.submit(
lambda: self.streamer._haltListener. lambda: self.streamer._haltListener.stream_read_resumed(
stream_read_resumed(chunk, _time)) chunk, _time
)
)

View File

@ -11,28 +11,35 @@ class AudioQuality(enum.Enum):
@staticmethod @staticmethod
def get_quality(audio_format: AudioFile.Format) -> AudioQuality: def get_quality(audio_format: AudioFile.Format) -> AudioQuality:
if audio_format == AudioFile.MP3_96 or \ if (
audio_format == AudioFile.OGG_VORBIS_96 or \ audio_format == AudioFile.MP3_96
audio_format == AudioFile.AAC_24_NORM: or audio_format == AudioFile.OGG_VORBIS_96
or audio_format == AudioFile.AAC_24_NORM
):
return AudioQuality.NORMAL return AudioQuality.NORMAL
if audio_format == AudioFile.MP3_160 or \ if (
audio_format == AudioFile.MP3_160_ENC or \ audio_format == AudioFile.MP3_160
audio_format == AudioFile.OGG_VORBIS_160 or \ or audio_format == AudioFile.MP3_160_ENC
audio_format == AudioFile.AAC_24: or audio_format == AudioFile.OGG_VORBIS_160
or audio_format == AudioFile.AAC_24
):
return AudioQuality.HIGH return AudioQuality.HIGH
if audio_format == AudioFile.MP3_320 or \ if (
audio_format == AudioFile.MP3_256 or \ audio_format == AudioFile.MP3_320
audio_format == AudioFile.OGG_VORBIS_320 or \ or audio_format == AudioFile.MP3_256
audio_format == AudioFile.AAC_48: or audio_format == AudioFile.OGG_VORBIS_320
or audio_format == AudioFile.AAC_48
):
return AudioQuality.VERY_HIGH return AudioQuality.VERY_HIGH
raise RuntimeError("Unknown format: {}".format(format)) raise RuntimeError("Unknown format: {}".format(format))
def get_matches(self, def get_matches(self, files: typing.List[AudioFile]) -> typing.List[AudioFile]:
files: typing.List[AudioFile]) -> typing.List[AudioFile]:
file_list = [] file_list = []
for file in files: for file in files:
if hasattr(file, "format") and AudioQuality.get_quality( if (
file.format) == self: hasattr(file, "format")
and AudioQuality.get_quality(file.format) == self
):
file_list.append(file) file_list.append(file)
return file_list return file_list

View File

@ -6,10 +6,26 @@ import time
class AesAudioDecrypt(AudioDecrypt): class AesAudioDecrypt(AudioDecrypt):
audio_aes_iv = bytes([ audio_aes_iv = bytes(
0x72, 0xe0, 0x67, 0xfb, 0xdd, 0xcb, 0xcf, 0x77, 0xeb, 0xe8, 0xbc, 0x64, [
0x3f, 0x63, 0x0d, 0x93 0x72,
]) 0xE0,
0x67,
0xFB,
0xDD,
0xCB,
0xCF,
0x77,
0xEB,
0xE8,
0xBC,
0x64,
0x3F,
0x63,
0x0D,
0x93,
]
)
iv_int = int.from_bytes(audio_aes_iv, "big") iv_int = int.from_bytes(audio_aes_iv, "big")
iv_diff = 0x100 iv_diff = 0x100
cipher = None cipher = None
@ -25,17 +41,21 @@ class AesAudioDecrypt(AudioDecrypt):
iv = self.iv_int + int(ChannelManager.CHUNK_SIZE * chunk_index / 16) iv = self.iv_int + int(ChannelManager.CHUNK_SIZE * chunk_index / 16)
start = time.time_ns() start = time.time_ns()
for i in range(0, len(buffer), 4096): for i in range(0, len(buffer), 4096):
cipher = AES.new(key=self.key, cipher = AES.new(
mode=AES.MODE_CTR, key=self.key,
counter=Counter.new(128, initial_value=iv)) mode=AES.MODE_CTR,
counter=Counter.new(128, initial_value=iv),
)
count = min(4096, len(buffer) - i) count = min(4096, len(buffer) - i)
decrypted_buffer = cipher.decrypt(buffer[i:i + count]) decrypted_buffer = cipher.decrypt(buffer[i : i + count])
new_buffer += decrypted_buffer new_buffer += decrypted_buffer
if count != len(decrypted_buffer): if count != len(decrypted_buffer):
raise RuntimeError( raise RuntimeError(
"Couldn't process all data, actual: {}, expected: {}". "Couldn't process all data, actual: {}, expected: {}".format(
format(len(decrypted_buffer), count)) len(decrypted_buffer), count
)
)
iv += self.iv_diff iv += self.iv_diff
@ -45,5 +65,8 @@ class AesAudioDecrypt(AudioDecrypt):
return new_buffer return new_buffer
def decrypt_time_ms(self): def decrypt_time_ms(self):
return 0 if self.decrypt_count == 0 else int( return (
(self.decrypt_total_time / self.decrypt_count) / 1000000) 0
if self.decrypt_count == 0
else int((self.decrypt_total_time / self.decrypt_count) / 1000000)
)

View File

@ -6,6 +6,5 @@ if typing.TYPE_CHECKING:
class AudioQualityPicker: class AudioQualityPicker:
def get_file(self, def get_file(self, files: typing.List[Metadata.AudioFile]) -> Metadata.AudioFile:
files: typing.List[Metadata.AudioFile]) -> Metadata.AudioFile:
pass pass

View File

@ -19,7 +19,8 @@ class ChannelManager(Closeable, PacketsReceiver.PacketsReceiver):
_channels: typing.Dict[int, Channel] = {} _channels: typing.Dict[int, Channel] = {}
_seqHolder: int = 0 _seqHolder: int = 0
_seqHolderLock: threading.Condition = threading.Condition() _seqHolderLock: threading.Condition = threading.Condition()
_executorService: concurrent.futures.ThreadPoolExecutor = concurrent.futures.ThreadPoolExecutor( _executorService: concurrent.futures.ThreadPoolExecutor = (
concurrent.futures.ThreadPoolExecutor()
) )
_session: Session = None _session: Session = None
@ -37,8 +38,8 @@ class ChannelManager(Closeable, PacketsReceiver.PacketsReceiver):
out.write_short(channel.chunkId) out.write_short(channel.chunkId)
out.write_int(0x00000000) out.write_int(0x00000000)
out.write_int(0x00000000) out.write_int(0x00000000)
out.write_int(0x00004e20) out.write_int(0x00004E20)
out.write_int(0x00030d40) out.write_int(0x00030D40)
out.write(file_id) out.write(file_id)
out.write_int(start) out.write_int(start)
out.write_int(end) out.write_int(end)
@ -53,7 +54,9 @@ class ChannelManager(Closeable, PacketsReceiver.PacketsReceiver):
if channel is None: if channel is None:
self._LOGGER.warning( self._LOGGER.warning(
"Couldn't find channel, id: {}, received: {}".format( "Couldn't find channel, id: {}, received: {}".format(
chunk_id, len(packet.payload))) chunk_id, len(packet.payload)
)
)
return return
channel._add_to_queue(payload) channel._add_to_queue(payload)
@ -63,14 +66,18 @@ class ChannelManager(Closeable, PacketsReceiver.PacketsReceiver):
if channel is None: if channel is None:
self._LOGGER.warning( self._LOGGER.warning(
"Dropping channel error, id: {}, code: {}".format( "Dropping channel error, id: {}, code: {}".format(
chunk_id, payload.read_short())) chunk_id, payload.read_short()
)
)
return return
channel.stream_error(payload.read_short()) channel.stream_error(payload.read_short())
else: else:
self._LOGGER.warning( self._LOGGER.warning(
"Couldn't handle packet, cmd: {}, payload: {}".format( "Couldn't handle packet, cmd: {}, payload: {}".format(
packet.cmd, Utils.Utils.bytes_to_hex(packet.payload))) packet.cmd, Utils.Utils.bytes_to_hex(packet.payload)
)
)
def close(self) -> None: def close(self) -> None:
self._executorService.shutdown() self._executorService.shutdown()
@ -84,8 +91,9 @@ class ChannelManager(Closeable, PacketsReceiver.PacketsReceiver):
_buffer: BytesOutputStream = BytesOutputStream() _buffer: BytesOutputStream = BytesOutputStream()
_header: bool = True _header: bool = True
def __init__(self, channel_manager: ChannelManager, file: AudioFile, def __init__(
chunk_index: int): self, channel_manager: ChannelManager, file: AudioFile, chunk_index: int
):
self._channelManager = channel_manager self._channelManager = channel_manager
self._file = file self._file = file
self._chunkIndex = chunk_index self._chunkIndex = chunk_index
@ -94,17 +102,18 @@ class ChannelManager(Closeable, PacketsReceiver.PacketsReceiver):
self._channelManager._seqHolder += 1 self._channelManager._seqHolder += 1
self._channelManager._executorService.submit( self._channelManager._executorService.submit(
lambda: ChannelManager.Channel.Handler(self)) lambda: ChannelManager.Channel.Handler(self)
)
def _handle(self, payload: BytesInputStream) -> bool: def _handle(self, payload: BytesInputStream) -> bool:
if len(payload.buffer) == 0: if len(payload.buffer) == 0:
if not self._header: if not self._header:
self._file.write_chunk(bytearray(payload.buffer), self._file.write_chunk(
self._chunkIndex, False) bytearray(payload.buffer), self._chunkIndex, False
)
return True return True
self._channelManager._LOGGER.debug( self._channelManager._LOGGER.debug("Received empty chunk, skipping.")
"Received empty chunk, skipping.")
return False return False
if self._header: if self._header:
@ -115,8 +124,9 @@ class ChannelManager(Closeable, PacketsReceiver.PacketsReceiver):
break break
header_id = payload.read_byte() header_id = payload.read_byte()
header_data = payload.read(length - 1) header_data = payload.read(length - 1)
self._file.write_header(int.from_bytes(header_id, "big"), self._file.write_header(
bytearray(header_data), False) int.from_bytes(header_id, "big"), bytearray(header_data), False
)
self._header = False self._header = False
else: else:
self._buffer.write(payload.read(len(payload.buffer))) self._buffer.write(payload.read(len(payload.buffer)))
@ -137,11 +147,12 @@ class ChannelManager(Closeable, PacketsReceiver.PacketsReceiver):
def run(self) -> None: def run(self) -> None:
self._channel._channelManager._LOGGER.debug( self._channel._channelManager._LOGGER.debug(
"ChannelManager.Handler is starting") "ChannelManager.Handler is starting"
)
with self._channel._q.all_tasks_done: with self._channel._q.all_tasks_done:
self._channel._channelManager._channels.pop( self._channel._channelManager._channels.pop(self._channel.chunkId)
self._channel.chunkId)
self._channel._channelManager._LOGGER.debug( self._channel._channelManager._LOGGER.debug(
"ChannelManager.Handler is shutting down") "ChannelManager.Handler is shutting down"
)

View File

@ -8,8 +8,7 @@ class ApResolver:
@staticmethod @staticmethod
def request(service_type: str): def request(service_type: str):
response = requests.get("{}?type={}".format(ApResolver.base_url, response = requests.get("{}?type={}".format(ApResolver.base_url, service_type))
service_type))
return response.json() return response.json()
@staticmethod @staticmethod

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,8 @@ class TokenProvider:
self._session = session self._session = session
def find_token_with_all_scopes( def find_token_with_all_scopes(
self, scopes: typing.List[str]) -> TokenProvider.StoredToken: self, scopes: typing.List[str]
) -> TokenProvider.StoredToken:
for token in self._tokens: for token in self._tokens:
if token.has_scopes(scopes): if token.has_scopes(scopes):
return token return token
@ -36,16 +37,20 @@ class TokenProvider:
return token return token
self._LOGGER.debug( self._LOGGER.debug(
"Token expired or not suitable, requesting again. scopes: {}, old_token: {}" "Token expired or not suitable, requesting again. scopes: {}, old_token: {}".format(
.format(scopes, token)) scopes, token
)
)
resp = self._session.mercury().send_sync_json( resp = self._session.mercury().send_sync_json(
MercuryRequests.request_token(self._session.device_id(), MercuryRequests.request_token(self._session.device_id(), ",".join(scopes))
",".join(scopes))) )
token = TokenProvider.StoredToken(resp) token = TokenProvider.StoredToken(resp)
self._LOGGER.debug( self._LOGGER.debug(
"Updated token successfully! scopes: {}, new_token: {}".format( "Updated token successfully! scopes: {}, new_token: {}".format(
scopes, token)) scopes, token
)
)
self._tokens.append(token) self._tokens.append(token)
return token return token
@ -66,9 +71,11 @@ class TokenProvider:
self.scopes = obj["scope"] self.scopes = obj["scope"]
def expired(self) -> bool: def expired(self) -> bool:
return self.timestamp + ( return (
self.expires_in - TokenProvider._TOKEN_EXPIRE_THRESHOLD self.timestamp
) * 1000 < TimeProvider.TimeProvider().current_time_millis() + (self.expires_in - TokenProvider._TOKEN_EXPIRE_THRESHOLD) * 1000
< TimeProvider.TimeProvider().current_time_millis()
)
def has_scope(self, scope: str) -> bool: def has_scope(self, scope: str) -> bool:
for s in self.scopes: for s in self.scopes:

View File

@ -4,104 +4,106 @@ from librespot.common.Utils import Utils
class DiffieHellman: class DiffieHellman:
prime_bytes: bytearray = bytes([ prime_bytes: bytearray = bytes(
0xFF, [
0xFF, 0xFF,
0xFF, 0xFF,
0xFF, 0xFF,
0xFF, 0xFF,
0xFF, 0xFF,
0xFF, 0xFF,
0xFF, 0xFF,
0xC9, 0xFF,
0x0F, 0xC9,
0xDA, 0x0F,
0xA2, 0xDA,
0x21, 0xA2,
0x68, 0x21,
0xC2, 0x68,
0x34, 0xC2,
0xC4, 0x34,
0xC6, 0xC4,
0x62, 0xC6,
0x8B, 0x62,
0x80, 0x8B,
0xDC, 0x80,
0x1C, 0xDC,
0xD1, 0x1C,
0x29, 0xD1,
0x02, 0x29,
0x4E, 0x02,
0x08, 0x4E,
0x8A, 0x08,
0x67, 0x8A,
0xCC, 0x67,
0x74, 0xCC,
0x02, 0x74,
0x0B, 0x02,
0xBE, 0x0B,
0xA6, 0xBE,
0x3B, 0xA6,
0x13, 0x3B,
0x9B, 0x13,
0x22, 0x9B,
0x51, 0x22,
0x4A, 0x51,
0x08, 0x4A,
0x79, 0x08,
0x8E, 0x79,
0x34, 0x8E,
0x04, 0x34,
0xDD, 0x04,
0xEF, 0xDD,
0x95, 0xEF,
0x19, 0x95,
0xB3, 0x19,
0xCD, 0xB3,
0x3A, 0xCD,
0x43, 0x3A,
0x1B, 0x43,
0x30, 0x1B,
0x2B, 0x30,
0x0A, 0x2B,
0x6D, 0x0A,
0xF2, 0x6D,
0x5F, 0xF2,
0x14, 0x5F,
0x37, 0x14,
0x4F, 0x37,
0xE1, 0x4F,
0x35, 0xE1,
0x6D, 0x35,
0x6D, 0x6D,
0x51, 0x6D,
0xC2, 0x51,
0x45, 0xC2,
0xE4, 0x45,
0x85, 0xE4,
0xB5, 0x85,
0x76, 0xB5,
0x62, 0x76,
0x5E, 0x62,
0x7E, 0x5E,
0xC6, 0x7E,
0xF4, 0xC6,
0x4C, 0xF4,
0x42, 0x4C,
0xE9, 0x42,
0xA6, 0xE9,
0x3A, 0xA6,
0x36, 0x3A,
0x20, 0x36,
0xFF, 0x20,
0xFF, 0xFF,
0xFF, 0xFF,
0xFF, 0xFF,
0xFF, 0xFF,
0xFF, 0xFF,
0xFF, 0xFF,
0xFF, 0xFF,
]) 0xFF,
]
)
prime: int = int.from_bytes(prime_bytes, "big") prime: int = int.from_bytes(prime_bytes, "big")
private_key: int private_key: int
public_key: int public_key: int

View File

@ -17,9 +17,12 @@ class ApiClient(Closeable):
self._baseUrl = "https://{}".format(ApResolver.get_random_spclient()) self._baseUrl = "https://{}".format(ApResolver.get_random_spclient())
def build_request( def build_request(
self, method: str, suffix: str, self,
headers: typing.Union[None, typing.Dict[str, str]], method: str,
body: typing.Union[None, bytes]) -> requests.PreparedRequest: suffix: str,
headers: typing.Union[None, typing.Dict[str, str]],
body: typing.Union[None, bytes],
) -> requests.PreparedRequest:
request = requests.PreparedRequest() request = requests.PreparedRequest()
request.method = method request.method = method
request.data = body request.data = body
@ -27,37 +30,53 @@ class ApiClient(Closeable):
if headers is not None: if headers is not None:
request.headers = headers request.headers = headers
request.headers["Authorization"] = "Bearer {}".format( request.headers["Authorization"] = "Bearer {}".format(
self._session.tokens().get("playlist-read")) self._session.tokens().get("playlist-read")
)
request.url = self._baseUrl + suffix request.url = self._baseUrl + suffix
return request return request
def send(self, method: str, suffix: str, def send(
headers: typing.Union[None, typing.Dict[str, str]], self,
body: typing.Union[None, bytes]) -> requests.Response: method: str,
suffix: str,
headers: typing.Union[None, typing.Dict[str, str]],
body: typing.Union[None, bytes],
) -> requests.Response:
resp = self._session.client().send( resp = self._session.client().send(
self.build_request(method, suffix, headers, body)) self.build_request(method, suffix, headers, body)
)
return resp return resp
def put_connect_state(self, connection_id: str, def put_connect_state(
proto: Connect.PutStateRequest) -> None: self, connection_id: str, proto: Connect.PutStateRequest
) -> None:
resp = self.send( resp = self.send(
"PUT", "PUT",
"/connect-state/v1/devices/{}".format(self._session.device_id()), { "/connect-state/v1/devices/{}".format(self._session.device_id()),
{
"Content-Type": "application/protobuf", "Content-Type": "application/protobuf",
"X-Spotify-Connection-Id": connection_id "X-Spotify-Connection-Id": connection_id,
}, proto.SerializeToString()) },
proto.SerializeToString(),
)
if resp.status_code == 413: if resp.status_code == 413:
self._LOGGER.warning( self._LOGGER.warning(
"PUT state payload is too large: {} bytes uncompressed.". "PUT state payload is too large: {} bytes uncompressed.".format(
format(len(proto.SerializeToString()))) len(proto.SerializeToString())
)
)
elif resp.status_code != 200: elif resp.status_code != 200:
self._LOGGER.warning("PUT state returned {}. headers: {}".format( self._LOGGER.warning(
resp.status_code, resp.headers)) "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.Track:
resp = self.send("GET", "/metadata/4/track/{}".format(track.hex_id()), resp = self.send(
None, None) "GET", "/metadata/4/track/{}".format(track.hex_id()), None, None
)
ApiClient.StatusCodeException.check_status(resp) ApiClient.StatusCodeException.check_status(resp)
body = resp.content body = resp.content
@ -68,9 +87,9 @@ class ApiClient(Closeable):
return proto return proto
def get_metadata_4_episode(self, episode: EpisodeId) -> Metadata.Episode: def get_metadata_4_episode(self, episode: EpisodeId) -> Metadata.Episode:
resp = self.send("GET", resp = self.send(
"/metadata/4/episode/{}".format(episode.hex_id()), "GET", "/metadata/4/episode/{}".format(episode.hex_id()), None, None
None, None) )
ApiClient.StatusCodeException.check_status(resp) ApiClient.StatusCodeException.check_status(resp)
body = resp.content body = resp.content
@ -81,8 +100,9 @@ class ApiClient(Closeable):
return proto return proto
def get_metadata_4_album(self, album: AlbumId) -> Metadata.Album: def get_metadata_4_album(self, album: AlbumId) -> Metadata.Album:
resp = self.send("GET", "/metadata/4/album/{}".format(album.hex_id()), resp = self.send(
None, None) "GET", "/metadata/4/album/{}".format(album.hex_id()), None, None
)
ApiClient.StatusCodeException.check_status(resp) ApiClient.StatusCodeException.check_status(resp)
body = resp.content body = resp.content
@ -93,9 +113,9 @@ class ApiClient(Closeable):
return proto return proto
def get_metadata_4_artist(self, artist: ArtistId) -> Metadata.Artist: def get_metadata_4_artist(self, artist: ArtistId) -> Metadata.Artist:
resp = self.send("GET", resp = self.send(
"/metadata/4/artist/{}".format(artist.hex_id()), None, "GET", "/metadata/4/artist/{}".format(artist.hex_id()), None, None
None) )
ApiClient.StatusCodeException.check_status(resp) ApiClient.StatusCodeException.check_status(resp)
body = resp.content body = resp.content
@ -106,8 +126,7 @@ class ApiClient(Closeable):
return proto return proto
def get_metadata_4_show(self, show: ShowId) -> Metadata.Show: def get_metadata_4_show(self, show: ShowId) -> Metadata.Show:
resp = self.send("GET", "/metadata/4/show/{}".format(show.hex_id()), resp = self.send("GET", "/metadata/4/show/{}".format(show.hex_id()), None, None)
None, None)
ApiClient.StatusCodeException.check_status(resp) ApiClient.StatusCodeException.check_status(resp)
body = resp.content body = resp.content

View File

@ -10,11 +10,9 @@ class DealerClient(Closeable):
def connect(self): def connect(self):
pass pass
def add_message_listener(self, listener: DealerClient.MessageListener, def add_message_listener(self, listener: DealerClient.MessageListener, *uris: str):
*uris: str):
pass pass
class MessageListener: class MessageListener:
def on_message(self, uri: str, headers: typing.Dict[str, str], def on_message(self, uri: str, headers: typing.Dict[str, str], payload: bytes):
payload: bytes):
pass pass

View File

@ -37,10 +37,12 @@ class MercuryClient(PacketsReceiver.PacketsReceiver, Closeable):
sub = Pubsub.Subscription() sub = Pubsub.Subscription()
sub.ParseFromString(payload) sub.ParseFromString(payload)
self._subscriptions.append( self._subscriptions.append(
MercuryClient.InternalSubListener(sub.uri, listener, True)) MercuryClient.InternalSubListener(sub.uri, listener, True)
)
else: else:
self._subscriptions.append( self._subscriptions.append(
MercuryClient.InternalSubListener(uri, listener, True)) MercuryClient.InternalSubListener(uri, listener, True)
)
self._LOGGER.debug("Subscribed successfully to {}!".format(uri)) self._LOGGER.debug("Subscribed successfully to {}!".format(uri))
@ -63,8 +65,10 @@ class MercuryClient(PacketsReceiver.PacketsReceiver, Closeable):
resp = callback.wait_response() resp = callback.wait_response()
if resp is None: if resp is None:
raise IOError( raise IOError(
"Request timeout out, {} passed, yet no response. seq: {}". "Request timeout out, {} passed, yet no response. seq: {}".format(
format(self._MERCURY_REQUEST_TIMEOUT, seq)) self._MERCURY_REQUEST_TIMEOUT, seq
)
)
return resp return resp
except queue.Empty as e: except queue.Empty as e:
raise IOError(e) raise IOError(e)
@ -85,7 +89,9 @@ class MercuryClient(PacketsReceiver.PacketsReceiver, Closeable):
self._LOGGER.debug( self._LOGGER.debug(
"Send Mercury request, seq: {}, uri: {}, method: {}".format( "Send Mercury request, seq: {}, uri: {}, method: {}".format(
seq, request.header.uri, request.header.method)) seq, request.header.uri, request.header.method
)
)
buffer.write_short(4) buffer.write_short(4)
buffer.write_int(seq) buffer.write_int(seq)
@ -129,7 +135,9 @@ class MercuryClient(PacketsReceiver.PacketsReceiver, Closeable):
self._LOGGER.debug( self._LOGGER.debug(
"Handling packet, cmd: 0x{}, seq: {}, flags: {}, parts: {}".format( "Handling packet, cmd: 0x{}, seq: {}, flags: {}, parts: {}".format(
Utils.bytes_to_hex(packet.cmd), seq, flags, parts)) Utils.bytes_to_hex(packet.cmd), seq, flags, parts
)
)
for i in range(parts): for i in range(parts):
size = payload.read_short() size = payload.read_short()
@ -157,30 +165,39 @@ class MercuryClient(PacketsReceiver.PacketsReceiver, Closeable):
if not dispatched: if not dispatched:
self._LOGGER.debug( self._LOGGER.debug(
"Couldn't dispatch Mercury event seq: {}, uri: {}, code: {}, payload: {}" "Couldn't dispatch Mercury event seq: {}, uri: {}, code: {}, payload: {}".format(
.format(seq, header.uri, header.status_code, resp.payload)) seq, header.uri, header.status_code, resp.payload
elif packet.is_cmd(Packet.Type.mercury_req) or \ )
packet.is_cmd(Packet.Type.mercury_sub) or \ )
packet.is_cmd(Packet.Type.mercury_sub): elif (
packet.is_cmd(Packet.Type.mercury_req)
or packet.is_cmd(Packet.Type.mercury_sub)
or packet.is_cmd(Packet.Type.mercury_sub)
):
callback = self._callbacks.get(seq) callback = self._callbacks.get(seq)
self._callbacks.pop(seq) self._callbacks.pop(seq)
if callback is not None: if callback is not None:
callback.response(resp) callback.response(resp)
else: else:
self._LOGGER.warning( self._LOGGER.warning(
"Skipped Mercury response, seq: {}, uri: {}, code: {}". "Skipped Mercury response, seq: {}, uri: {}, code: {}".format(
format(seq, resp.uri, resp.status_code)) seq, resp.uri, resp.status_code
)
)
with self._removeCallbackLock: with self._removeCallbackLock:
self._removeCallbackLock.notify_all() self._removeCallbackLock.notify_all()
else: else:
self._LOGGER.warning( self._LOGGER.warning(
"Couldn't handle packet, seq: {}, uri: {}, code: {}".format( "Couldn't handle packet, seq: {}, uri: {}, code: {}".format(
seq, header.uri, header.status_code)) seq, header.uri, header.status_code
)
)
def interested_in(self, uri: str, listener: SubListener) -> None: def interested_in(self, uri: str, listener: SubListener) -> None:
self._subscriptions.append( self._subscriptions.append(
MercuryClient.InternalSubListener(uri, listener, False)) MercuryClient.InternalSubListener(uri, listener, False)
)
def not_interested_in(self, listener: SubListener) -> None: def not_interested_in(self, listener: SubListener) -> None:
try: try:
@ -215,8 +232,7 @@ class MercuryClient(PacketsReceiver.PacketsReceiver, Closeable):
self._reference.task_done() self._reference.task_done()
def wait_response(self) -> typing.Any: def wait_response(self) -> typing.Any:
return self._reference.get( return self._reference.get(timeout=MercuryClient._MERCURY_REQUEST_TIMEOUT)
timeout=MercuryClient._MERCURY_REQUEST_TIMEOUT)
# class PubSubException(MercuryClient.MercuryException): # class PubSubException(MercuryClient.MercuryException):
# pass # pass
@ -249,8 +265,7 @@ class MercuryClient(PacketsReceiver.PacketsReceiver, Closeable):
payload: typing.List[bytes] payload: typing.List[bytes]
status_code: int status_code: int
def __init__(self, header: Mercury.Header, def __init__(self, header: Mercury.Header, payload: typing.List[bytes]):
payload: typing.List[bytes]):
self.uri = header.uri self.uri = header.uri
self.status_code = header.status_code self.status_code = header.status_code
self.payload = payload[1:] self.payload = payload[1:]

View File

@ -12,28 +12,35 @@ class RawMercuryRequest:
@staticmethod @staticmethod
def sub(uri: str): def sub(uri: str):
return RawMercuryRequest.new_builder().set_uri(uri).set_method( return RawMercuryRequest.new_builder().set_uri(uri).set_method("SUB").build()
"SUB").build()
@staticmethod @staticmethod
def unsub(uri: str): def unsub(uri: str):
return RawMercuryRequest.new_builder().set_uri(uri).set_method( return RawMercuryRequest.new_builder().set_uri(uri).set_method("UNSUB").build()
"UNSUB").build()
@staticmethod @staticmethod
def get(uri: str): def get(uri: str):
return RawMercuryRequest.new_builder().set_uri(uri).set_method( return RawMercuryRequest.new_builder().set_uri(uri).set_method("GET").build()
"GET").build()
@staticmethod @staticmethod
def send(uri: str, part: bytes): def send(uri: str, part: bytes):
return RawMercuryRequest.new_builder().set_uri(uri).add_payload_part( return (
part).set_method("SEND").build() RawMercuryRequest.new_builder()
.set_uri(uri)
.add_payload_part(part)
.set_method("SEND")
.build()
)
@staticmethod @staticmethod
def post(uri: str, part: bytes): def post(uri: str, part: bytes):
return RawMercuryRequest.new_builder().set_uri(uri).set_method( return (
"POST").add_payload_part(part).build() RawMercuryRequest.new_builder()
.set_uri(uri)
.set_method("POST")
.add_payload_part(part)
.build()
)
@staticmethod @staticmethod
def new_builder(): def new_builder():
@ -59,10 +66,9 @@ class RawMercuryRequest:
self.header_dict["method"] = method self.header_dict["method"] = method
return self return self
def add_user_field(self, def add_user_field(
field: Mercury.UserField = None, self, field: Mercury.UserField = None, key: str = None, value: str = None
key: str = None, ):
value: str = None):
if field is None and (key is None or value is None): if field is None and (key is None or value is None):
return self return self
try: try:
@ -73,7 +79,8 @@ class RawMercuryRequest:
self.header_dict["user_fields"].append(field) self.header_dict["user_fields"].append(field)
if key is not None and value is not None: if key is not None and value is not None:
self.header_dict["user_fields"].append( self.header_dict["user_fields"].append(
Mercury.UserField(key=key, value=value.encode())) Mercury.UserField(key=key, value=value.encode())
)
return self return self
def add_payload_part(self, part: bytes): def add_payload_part(self, part: bytes):
@ -84,5 +91,4 @@ class RawMercuryRequest:
return self.add_payload_part(msg) return self.add_payload_part(msg)
def build(self): def build(self):
return RawMercuryRequest(Mercury.Header(**self.header_dict), return RawMercuryRequest(Mercury.Header(**self.header_dict), self.payload)
self.payload)

View File

@ -49,9 +49,11 @@ class PlayableId:
@staticmethod @staticmethod
def is_supported(uri: str): def is_supported(uri: str):
return (not uri.startswith("spotify:local:") return (
and not uri == "spotify:delimiter" not uri.startswith("spotify:local:")
and not uri == "spotify:meta:delimiter") and not uri == "spotify:delimiter"
and not uri == "spotify:meta:delimiter"
)
@staticmethod @staticmethod
def should_play(track: ContextTrack): def should_play(track: ContextTrack):
@ -96,8 +98,7 @@ class AlbumId(SpotifyId):
matcher = AlbumId._PATTERN.search(uri) matcher = AlbumId._PATTERN.search(uri)
if matcher is not None: if matcher is not None:
album_id = matcher.group(1) album_id = matcher.group(1)
return AlbumId( return AlbumId(Utils.bytes_to_hex(AlbumId._BASE62.decode(album_id, 16)))
Utils.bytes_to_hex(AlbumId._BASE62.decode(album_id, 16)))
raise TypeError("Not a Spotify album ID: {}.f".format(uri)) raise TypeError("Not a Spotify album ID: {}.f".format(uri))
@staticmethod @staticmethod
@ -110,7 +111,8 @@ class AlbumId(SpotifyId):
def to_mercury_uri(self) -> str: def to_mercury_uri(self) -> str:
return "spotify:album:{}".format( return "spotify:album:{}".format(
AlbumId._BASE62.encode(Utils.hex_to_bytes(self._hexId))) AlbumId._BASE62.encode(Utils.hex_to_bytes(self._hexId))
)
def hex_id(self) -> str: def hex_id(self) -> str:
return self._hexId return self._hexId
@ -129,14 +131,12 @@ class ArtistId(SpotifyId):
matcher = ArtistId._PATTERN.search(uri) matcher = ArtistId._PATTERN.search(uri)
if matcher is not None: if matcher is not None:
artist_id = matcher.group(1) artist_id = matcher.group(1)
return ArtistId( return ArtistId(Utils.bytes_to_hex(ArtistId._BASE62.decode(artist_id, 16)))
Utils.bytes_to_hex(ArtistId._BASE62.decode(artist_id, 16)))
raise TypeError("Not a Spotify artist ID: {}".format(uri)) raise TypeError("Not a Spotify artist ID: {}".format(uri))
@staticmethod @staticmethod
def from_base62(base62: str) -> ArtistId: def from_base62(base62: str) -> ArtistId:
return ArtistId(Utils.bytes_to_hex(ArtistId._BASE62.decode(base62, return ArtistId(Utils.bytes_to_hex(ArtistId._BASE62.decode(base62, 16)))
16)))
@staticmethod @staticmethod
def from_hex(hex_str: str) -> ArtistId: def from_hex(hex_str: str) -> ArtistId:
@ -147,7 +147,8 @@ class ArtistId(SpotifyId):
def to_spotify_uri(self) -> str: def to_spotify_uri(self) -> str:
return "spotify:artist:{}".format( return "spotify:artist:{}".format(
ArtistId._BASE62.encode(Utils.hex_to_bytes(self._hexId))) ArtistId._BASE62.encode(Utils.hex_to_bytes(self._hexId))
)
def hex_id(self) -> str: def hex_id(self) -> str:
return self._hexId return self._hexId
@ -166,14 +167,13 @@ class EpisodeId(SpotifyId, PlayableId):
if matcher is not None: if matcher is not None:
episode_id = matcher.group(1) episode_id = matcher.group(1)
return EpisodeId( return EpisodeId(
Utils.Utils.bytes_to_hex( Utils.Utils.bytes_to_hex(PlayableId.BASE62.decode(episode_id, 16))
PlayableId.BASE62.decode(episode_id, 16))) )
TypeError("Not a Spotify episode ID: {}".format(uri)) TypeError("Not a Spotify episode ID: {}".format(uri))
@staticmethod @staticmethod
def from_base62(base62: str) -> EpisodeId: def from_base62(base62: str) -> EpisodeId:
return EpisodeId( return EpisodeId(Utils.Utils.bytes_to_hex(PlayableId.BASE62.decode(base62, 16)))
Utils.Utils.bytes_to_hex(PlayableId.BASE62.decode(base62, 16)))
@staticmethod @staticmethod
def from_hex(hex_str: str) -> EpisodeId: def from_hex(hex_str: str) -> EpisodeId:
@ -184,7 +184,8 @@ class EpisodeId(SpotifyId, PlayableId):
def to_spotify_uri(self) -> str: def to_spotify_uri(self) -> str:
return "Spotify:episode:{}".format( return "Spotify:episode:{}".format(
PlayableId.BASE62.encode(Utils.Utils.hex_to_bytes(self._hexId))) PlayableId.BASE62.encode(Utils.Utils.hex_to_bytes(self._hexId))
)
def hex_id(self) -> str: def hex_id(self) -> str:
return self._hexId return self._hexId
@ -206,8 +207,7 @@ class ShowId(SpotifyId):
matcher = ShowId._PATTERN.search(uri) matcher = ShowId._PATTERN.search(uri)
if matcher is not None: if matcher is not None:
show_id = matcher.group(1) show_id = matcher.group(1)
return ShowId( return ShowId(Utils.bytes_to_hex(ShowId._BASE62.decode(show_id, 16)))
Utils.bytes_to_hex(ShowId._BASE62.decode(show_id, 16)))
raise TypeError("Not a Spotify show ID: {}".format(uri)) raise TypeError("Not a Spotify show ID: {}".format(uri))
@staticmethod @staticmethod
@ -223,7 +223,8 @@ class ShowId(SpotifyId):
def to_spotify_uri(self) -> str: def to_spotify_uri(self) -> str:
return "spotify:show:{}".format( return "spotify:show:{}".format(
ShowId._BASE62.encode(Utils.hex_to_bytes(self._hexId))) ShowId._BASE62.encode(Utils.hex_to_bytes(self._hexId))
)
def hex_id(self) -> str: def hex_id(self) -> str:
return self._hexId return self._hexId
@ -241,14 +242,12 @@ class TrackId(PlayableId, SpotifyId):
search = TrackId.PATTERN.search(uri) search = TrackId.PATTERN.search(uri)
if search is not None: if search is not None:
track_id = search.group(1) track_id = search.group(1)
return TrackId( return TrackId(Utils.bytes_to_hex(PlayableId.BASE62.decode(track_id, 16)))
Utils.bytes_to_hex(PlayableId.BASE62.decode(track_id, 16)))
raise RuntimeError("Not a Spotify track ID: {}".format(uri)) raise RuntimeError("Not a Spotify track ID: {}".format(uri))
@staticmethod @staticmethod
def from_base62(base62: str) -> TrackId: def from_base62(base62: str) -> TrackId:
return TrackId(Utils.bytes_to_hex(PlayableId.BASE62.decode(base62, return TrackId(Utils.bytes_to_hex(PlayableId.BASE62.decode(base62, 16)))
16)))
@staticmethod @staticmethod
def from_hex(hex_str: str) -> TrackId: def from_hex(hex_str: str) -> TrackId:

View File

@ -38,8 +38,7 @@ class Player(Closeable, PlayerSession.Listener, AudioSink.Listener):
self.__init_state() self.__init_state()
def __init_state(self): def __init_state(self):
self._state = StateWrapper.StateWrapper(self._session, self, self._state = StateWrapper.StateWrapper(self._session, self, self._conf)
self._conf)
class Anonymous(DeviceStateHandler.Listener): class Anonymous(DeviceStateHandler.Listener):
_player: Player = None _player: Player = None
@ -55,8 +54,7 @@ class Player(Closeable, PlayerSession.Listener, AudioSink.Listener):
endpoint: DeviceStateHandler.Endpoint, endpoint: DeviceStateHandler.Endpoint,
data: DeviceStateHandler.CommandBody, data: DeviceStateHandler.CommandBody,
) -> None: ) -> None:
self._player._LOGGER.debug( self._player._LOGGER.debug("Received command: {}".format(endpoint))
"Received command: {}".format(endpoint))
self._deviceStateListener = Anonymous(self) self._deviceStateListener = Anonymous(self)
self._state.add_listener(self._deviceStateListener) self._state.add_listener(self._deviceStateListener)

View File

@ -15,11 +15,17 @@ class PlayerConfiguration:
initial_volume: int initial_volume: int
volume_steps: int volume_steps: int
def __init__(self, preferred_quality: AudioQuality, def __init__(
enable_normalisation: bool, normalisation_pregain: float, self,
autoplay_enabled: bool, crossfade_duration: int, preferred_quality: AudioQuality,
preload_enabled: bool, initial_volume: int, enable_normalisation: bool,
volume_steps: int): normalisation_pregain: float,
autoplay_enabled: bool,
crossfade_duration: int,
preload_enabled: bool,
initial_volume: int,
volume_steps: int,
):
self.preferred_quality = preferred_quality self.preferred_quality = preferred_quality
self.enable_normalisation = enable_normalisation self.enable_normalisation = enable_normalisation
self.normalisation_pregain = normalisation_pregain self.normalisation_pregain = normalisation_pregain
@ -44,18 +50,15 @@ class PlayerConfiguration:
def __init__(self): def __init__(self):
pass pass
def set_preferred_quality( def set_preferred_quality(self, preferred_quality: AudioQuality) -> __class__:
self, preferred_quality: AudioQuality) -> __class__:
self.preferred_quality = preferred_quality self.preferred_quality = preferred_quality
return self return self
def set_enable_normalisation(self, def set_enable_normalisation(self, enable_normalisation: bool) -> __class__:
enable_normalisation: bool) -> __class__:
self.enable_normalisation = enable_normalisation self.enable_normalisation = enable_normalisation
return self return self
def set_normalisation_pregain( def set_normalisation_pregain(self, normalisation_pregain: float) -> __class__:
self, normalisation_pregain: float) -> __class__:
self.normalisation_pregain = normalisation_pregain self.normalisation_pregain = normalisation_pregain
return self return self
@ -73,7 +76,12 @@ class PlayerConfiguration:
def build(self) -> PlayerConfiguration: def build(self) -> PlayerConfiguration:
return PlayerConfiguration( return PlayerConfiguration(
self.preferred_quality, self.enable_normalisation, self.preferred_quality,
self.normalisation_pregain, self.autoplay_enabled, self.enable_normalisation,
self.crossfade_duration, self.preload_enabled, self.normalisation_pregain,
self.initial_volume, self.volume_steps) self.autoplay_enabled,
self.crossfade_duration,
self.preload_enabled,
self.initial_volume,
self.volume_steps,
)

View File

@ -20,8 +20,7 @@ class StateWrapper(DeviceStateHandler.Listener, DealerClient.MessageListener):
_player: Player = None _player: Player = None
_device: DeviceStateHandler = None _device: DeviceStateHandler = None
def __init__(self, session: Session, player: Player, def __init__(self, session: Session, player: Player, conf: PlayerConfiguration):
conf: PlayerConfiguration):
self._session = session self._session = session
self._player = player self._player = player
self._device = DeviceStateHandler(session, self, conf) self._device = DeviceStateHandler(session, self, conf)
@ -40,9 +39,9 @@ class StateWrapper(DeviceStateHandler.Listener, DealerClient.MessageListener):
playback_speed=1.0, playback_speed=1.0,
suppressions=Suppressions(), suppressions=Suppressions(),
context_restrictions=Restrictions(), context_restrictions=Restrictions(),
options=ContextPlayerOptions(repeating_context=False, options=ContextPlayerOptions(
shuffling_context=False, repeating_context=False, shuffling_context=False, repeating_track=False
repeating_track=False), ),
position_as_of_timestamp=0, position_as_of_timestamp=0,
position=0, position=0,
is_playing=False, is_playing=False,
@ -52,9 +51,7 @@ class StateWrapper(DeviceStateHandler.Listener, DealerClient.MessageListener):
self._device.add_listener(listener) self._device.add_listener(listener)
def ready(self) -> None: def ready(self) -> None:
self._device.update_state(Connect.PutStateReason.NEW_DEVICE, 0, self._device.update_state(Connect.PutStateReason.NEW_DEVICE, 0, self._state)
self._state)
def on_message(self, uri: str, headers: typing.Dict[str, str], def on_message(self, uri: str, headers: typing.Dict[str, str], payload: bytes):
payload: bytes):
pass pass

View File

@ -19,26 +19,26 @@ class VorbisOnlyAudioQuality(AudioQualityPicker):
@staticmethod @staticmethod
def get_vorbis_file(files: typing.List[Metadata.AudioFile]): def get_vorbis_file(files: typing.List[Metadata.AudioFile]):
for file in files: for file in files:
if hasattr(file, "format") and SuperAudioFormat.get( if (
file.format) == SuperAudioFormat.VORBIS: hasattr(file, "format")
and SuperAudioFormat.get(file.format) == SuperAudioFormat.VORBIS
):
return file return file
return None return None
def get_file(self, files: typing.List[Metadata.AudioFile]): def get_file(self, files: typing.List[Metadata.AudioFile]):
matches: typing.List[Metadata.AudioFile] = self.preferred.get_matches( matches: typing.List[Metadata.AudioFile] = self.preferred.get_matches(files)
files) vorbis: Metadata.AudioFile = VorbisOnlyAudioQuality.get_vorbis_file(matches)
vorbis: Metadata.AudioFile = VorbisOnlyAudioQuality.get_vorbis_file(
matches)
if vorbis is None: if vorbis is None:
vorbis: Metadata.AudioFile = VorbisOnlyAudioQuality.get_vorbis_file( vorbis: Metadata.AudioFile = VorbisOnlyAudioQuality.get_vorbis_file(files)
files)
if vorbis is not None: if vorbis is not None:
self._LOGGER.warning( self._LOGGER.warning(
"Using {} because preferred {} couldn't be found.".format( "Using {} because preferred {} couldn't be found.".format(
vorbis.format, self.preferred)) vorbis.format, self.preferred
)
)
else: else:
self._LOGGER.fatal( self._LOGGER.fatal("Couldn't find any Vorbis file, available: {}")
"Couldn't find any Vorbis file, available: {}")
return vorbis return vorbis

View File

@ -22,7 +22,8 @@ class DeviceStateHandler:
_listeners: typing.List[DeviceStateHandler.Listener] = [] _listeners: typing.List[DeviceStateHandler.Listener] = []
_putState: Connect.PutStateRequest = None _putState: Connect.PutStateRequest = None
_putStateWorker: concurrent.futures.ThreadPoolExecutor = ( _putStateWorker: concurrent.futures.ThreadPoolExecutor = (
concurrent.futures.ThreadPoolExecutor()) concurrent.futures.ThreadPoolExecutor()
)
_connectionId: str = None _connectionId: str = None
def __init__(self, session: Session, player, conf: PlayerConfiguration): def __init__(self, session: Session, player, conf: PlayerConfiguration):
@ -35,8 +36,9 @@ class DeviceStateHandler:
if self._connectionId is None or self._connectionId != newer: if self._connectionId is None or self._connectionId != newer:
self._connectionId = newer self._connectionId = newer
self._LOGGER.debug("Updated Spotify-Connection-Id: {}".format( self._LOGGER.debug(
self._connectionId)) "Updated Spotify-Connection-Id: {}".format(self._connectionId)
)
self._notify_ready() self._notify_ready()
def add_listener(self, listener: DeviceStateHandler.Listener): def add_listener(self, listener: DeviceStateHandler.Listener):
@ -69,11 +71,13 @@ class DeviceStateHandler:
def _put_connect_state(self, req: Connect.PutStateRequest): def _put_connect_state(self, req: Connect.PutStateRequest):
self._session.api().put_connect_state(self._connectionId, req) self._session.api().put_connect_state(self._connectionId, req)
self._LOGGER.info("Put state. ts: {}, connId: {}, reason: {}".format( self._LOGGER.info(
req.client_side_timestamp, "Put state. ts: {}, connId: {}, reason: {}".format(
Utils.truncate_middle(self._connectionId, 10), req.client_side_timestamp,
req.put_state_reason, Utils.truncate_middle(self._connectionId, 10),
)) req.put_state_reason,
)
)
class Endpoint(enum.Enum): class Endpoint(enum.Enum):
Play: str = "play" Play: str = "play"

View File

@ -7,40 +7,42 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='canvaz.proto', name="canvaz.proto",
package='com.spotify.canvazcache', package="com.spotify.canvazcache",
syntax='proto3', syntax="proto3",
serialized_options=b'\n\022com.spotify.canvazH\002', serialized_options=b"\n\022com.spotify.canvazH\002",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x0c\x63\x61nvaz.proto\x12\x17\x63om.spotify.canvazcache\x1a\x11\x63\x61nvaz-meta.proto\"3\n\x06\x41rtist\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06\x61vatar\x18\x03 \x01(\t\"\xe1\x02\n\x14\x45ntityCanvazResponse\x12\x46\n\x08\x63\x61nvases\x18\x01 \x03(\x0b\x32\x34.com.spotify.canvazcache.EntityCanvazResponse.Canvaz\x12\x16\n\x0ettl_in_seconds\x18\x02 \x01(\x03\x1a\xe8\x01\n\x06\x43\x61nvaz\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\x0f\n\x07\x66ile_id\x18\x03 \x01(\t\x12&\n\x04type\x18\x04 \x01(\x0e\x32\x18.com.spotify.canvaz.Type\x12\x12\n\nentity_uri\x18\x05 \x01(\t\x12/\n\x06\x61rtist\x18\x06 \x01(\x0b\x32\x1f.com.spotify.canvazcache.Artist\x12\x10\n\x08\x65xplicit\x18\x07 \x01(\x08\x12\x13\n\x0buploaded_by\x18\x08 \x01(\t\x12\x0c\n\x04\x65tag\x18\t \x01(\t\x12\x12\n\ncanvas_uri\x18\x0b \x01(\t\"\x88\x01\n\x13\x45ntityCanvazRequest\x12\x45\n\x08\x65ntities\x18\x01 \x03(\x0b\x32\x33.com.spotify.canvazcache.EntityCanvazRequest.Entity\x1a*\n\x06\x45ntity\x12\x12\n\nentity_uri\x18\x01 \x01(\t\x12\x0c\n\x04\x65tag\x18\x02 \x01(\tB\x16\n\x12\x63om.spotify.canvazH\x02\x62\x06proto3', serialized_pb=b'\n\x0c\x63\x61nvaz.proto\x12\x17\x63om.spotify.canvazcache\x1a\x11\x63\x61nvaz-meta.proto"3\n\x06\x41rtist\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06\x61vatar\x18\x03 \x01(\t"\xe1\x02\n\x14\x45ntityCanvazResponse\x12\x46\n\x08\x63\x61nvases\x18\x01 \x03(\x0b\x32\x34.com.spotify.canvazcache.EntityCanvazResponse.Canvaz\x12\x16\n\x0ettl_in_seconds\x18\x02 \x01(\x03\x1a\xe8\x01\n\x06\x43\x61nvaz\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\x0f\n\x07\x66ile_id\x18\x03 \x01(\t\x12&\n\x04type\x18\x04 \x01(\x0e\x32\x18.com.spotify.canvaz.Type\x12\x12\n\nentity_uri\x18\x05 \x01(\t\x12/\n\x06\x61rtist\x18\x06 \x01(\x0b\x32\x1f.com.spotify.canvazcache.Artist\x12\x10\n\x08\x65xplicit\x18\x07 \x01(\x08\x12\x13\n\x0buploaded_by\x18\x08 \x01(\t\x12\x0c\n\x04\x65tag\x18\t \x01(\t\x12\x12\n\ncanvas_uri\x18\x0b \x01(\t"\x88\x01\n\x13\x45ntityCanvazRequest\x12\x45\n\x08\x65ntities\x18\x01 \x03(\x0b\x32\x33.com.spotify.canvazcache.EntityCanvazRequest.Entity\x1a*\n\x06\x45ntity\x12\x12\n\nentity_uri\x18\x01 \x01(\t\x12\x0c\n\x04\x65tag\x18\x02 \x01(\tB\x16\n\x12\x63om.spotify.canvazH\x02\x62\x06proto3',
dependencies=[ dependencies=[
canvaz__meta__pb2.DESCRIPTOR, canvaz__meta__pb2.DESCRIPTOR,
]) ],
)
_ARTIST = _descriptor.Descriptor( _ARTIST = _descriptor.Descriptor(
name='Artist', name="Artist",
full_name='com.spotify.canvazcache.Artist', full_name="com.spotify.canvazcache.Artist",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='uri', name="uri",
full_name='com.spotify.canvazcache.Artist.uri', full_name="com.spotify.canvazcache.Artist.uri",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -48,17 +50,18 @@ _ARTIST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='name', name="name",
full_name='com.spotify.canvazcache.Artist.name', full_name="com.spotify.canvazcache.Artist.name",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -66,17 +69,18 @@ _ARTIST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='avatar', name="avatar",
full_name='com.spotify.canvazcache.Artist.avatar', full_name="com.spotify.canvazcache.Artist.avatar",
index=2, index=2,
number=3, number=3,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -84,14 +88,15 @@ _ARTIST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=60, serialized_start=60,
@ -99,23 +104,23 @@ _ARTIST = _descriptor.Descriptor(
) )
_ENTITYCANVAZRESPONSE_CANVAZ = _descriptor.Descriptor( _ENTITYCANVAZRESPONSE_CANVAZ = _descriptor.Descriptor(
name='Canvaz', name="Canvaz",
full_name='com.spotify.canvazcache.EntityCanvazResponse.Canvaz', full_name="com.spotify.canvazcache.EntityCanvazResponse.Canvaz",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='id', name="id",
full_name='com.spotify.canvazcache.EntityCanvazResponse.Canvaz.id', full_name="com.spotify.canvazcache.EntityCanvazResponse.Canvaz.id",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -123,17 +128,18 @@ _ENTITYCANVAZRESPONSE_CANVAZ = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='url', name="url",
full_name='com.spotify.canvazcache.EntityCanvazResponse.Canvaz.url', full_name="com.spotify.canvazcache.EntityCanvazResponse.Canvaz.url",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -141,17 +147,18 @@ _ENTITYCANVAZRESPONSE_CANVAZ = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='file_id', name="file_id",
full_name='com.spotify.canvazcache.EntityCanvazResponse.Canvaz.file_id', full_name="com.spotify.canvazcache.EntityCanvazResponse.Canvaz.file_id",
index=2, index=2,
number=3, number=3,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -159,10 +166,11 @@ _ENTITYCANVAZRESPONSE_CANVAZ = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='type', name="type",
full_name='com.spotify.canvazcache.EntityCanvazResponse.Canvaz.type', full_name="com.spotify.canvazcache.EntityCanvazResponse.Canvaz.type",
index=3, index=3,
number=4, number=4,
type=14, type=14,
@ -177,17 +185,18 @@ _ENTITYCANVAZRESPONSE_CANVAZ = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='entity_uri', name="entity_uri",
full_name='com.spotify.canvazcache.EntityCanvazResponse.Canvaz.entity_uri', full_name="com.spotify.canvazcache.EntityCanvazResponse.Canvaz.entity_uri",
index=4, index=4,
number=5, number=5,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -195,10 +204,11 @@ _ENTITYCANVAZRESPONSE_CANVAZ = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='artist', name="artist",
full_name='com.spotify.canvazcache.EntityCanvazResponse.Canvaz.artist', full_name="com.spotify.canvazcache.EntityCanvazResponse.Canvaz.artist",
index=5, index=5,
number=6, number=6,
type=11, type=11,
@ -213,10 +223,11 @@ _ENTITYCANVAZRESPONSE_CANVAZ = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='explicit', name="explicit",
full_name='com.spotify.canvazcache.EntityCanvazResponse.Canvaz.explicit', full_name="com.spotify.canvazcache.EntityCanvazResponse.Canvaz.explicit",
index=6, index=6,
number=7, number=7,
type=8, type=8,
@ -231,17 +242,18 @@ _ENTITYCANVAZRESPONSE_CANVAZ = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='uploaded_by', name="uploaded_by",
full_name='com.spotify.canvazcache.EntityCanvazResponse.Canvaz.uploaded_by', full_name="com.spotify.canvazcache.EntityCanvazResponse.Canvaz.uploaded_by",
index=7, index=7,
number=8, number=8,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -249,17 +261,18 @@ _ENTITYCANVAZRESPONSE_CANVAZ = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='etag', name="etag",
full_name='com.spotify.canvazcache.EntityCanvazResponse.Canvaz.etag', full_name="com.spotify.canvazcache.EntityCanvazResponse.Canvaz.etag",
index=8, index=8,
number=9, number=9,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -267,17 +280,18 @@ _ENTITYCANVAZRESPONSE_CANVAZ = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='canvas_uri', name="canvas_uri",
full_name='com.spotify.canvazcache.EntityCanvazResponse.Canvaz.canvas_uri', full_name="com.spotify.canvazcache.EntityCanvazResponse.Canvaz.canvas_uri",
index=9, index=9,
number=11, number=11,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -285,14 +299,15 @@ _ENTITYCANVAZRESPONSE_CANVAZ = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=235, serialized_start=235,
@ -300,16 +315,16 @@ _ENTITYCANVAZRESPONSE_CANVAZ = _descriptor.Descriptor(
) )
_ENTITYCANVAZRESPONSE = _descriptor.Descriptor( _ENTITYCANVAZRESPONSE = _descriptor.Descriptor(
name='EntityCanvazResponse', name="EntityCanvazResponse",
full_name='com.spotify.canvazcache.EntityCanvazResponse', full_name="com.spotify.canvazcache.EntityCanvazResponse",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='canvases', name="canvases",
full_name='com.spotify.canvazcache.EntityCanvazResponse.canvases', full_name="com.spotify.canvazcache.EntityCanvazResponse.canvases",
index=0, index=0,
number=1, number=1,
type=11, type=11,
@ -324,10 +339,11 @@ _ENTITYCANVAZRESPONSE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='ttl_in_seconds', name="ttl_in_seconds",
full_name='com.spotify.canvazcache.EntityCanvazResponse.ttl_in_seconds', full_name="com.spotify.canvazcache.EntityCanvazResponse.ttl_in_seconds",
index=1, index=1,
number=2, number=2,
type=3, type=3,
@ -342,7 +358,8 @@ _ENTITYCANVAZRESPONSE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[ nested_types=[
@ -351,7 +368,7 @@ _ENTITYCANVAZRESPONSE = _descriptor.Descriptor(
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=114, serialized_start=114,
@ -359,23 +376,23 @@ _ENTITYCANVAZRESPONSE = _descriptor.Descriptor(
) )
_ENTITYCANVAZREQUEST_ENTITY = _descriptor.Descriptor( _ENTITYCANVAZREQUEST_ENTITY = _descriptor.Descriptor(
name='Entity', name="Entity",
full_name='com.spotify.canvazcache.EntityCanvazRequest.Entity', full_name="com.spotify.canvazcache.EntityCanvazRequest.Entity",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='entity_uri', name="entity_uri",
full_name='com.spotify.canvazcache.EntityCanvazRequest.Entity.entity_uri', full_name="com.spotify.canvazcache.EntityCanvazRequest.Entity.entity_uri",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -383,17 +400,18 @@ _ENTITYCANVAZREQUEST_ENTITY = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='etag', name="etag",
full_name='com.spotify.canvazcache.EntityCanvazRequest.Entity.etag', full_name="com.spotify.canvazcache.EntityCanvazRequest.Entity.etag",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -401,14 +419,15 @@ _ENTITYCANVAZREQUEST_ENTITY = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=564, serialized_start=564,
@ -416,16 +435,16 @@ _ENTITYCANVAZREQUEST_ENTITY = _descriptor.Descriptor(
) )
_ENTITYCANVAZREQUEST = _descriptor.Descriptor( _ENTITYCANVAZREQUEST = _descriptor.Descriptor(
name='EntityCanvazRequest', name="EntityCanvazRequest",
full_name='com.spotify.canvazcache.EntityCanvazRequest', full_name="com.spotify.canvazcache.EntityCanvazRequest",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='entities', name="entities",
full_name='com.spotify.canvazcache.EntityCanvazRequest.entities', full_name="com.spotify.canvazcache.EntityCanvazRequest.entities",
index=0, index=0,
number=1, number=1,
type=11, type=11,
@ -440,7 +459,8 @@ _ENTITYCANVAZREQUEST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[ nested_types=[
@ -449,79 +469,78 @@ _ENTITYCANVAZREQUEST = _descriptor.Descriptor(
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=470, serialized_start=470,
serialized_end=606, serialized_end=606,
) )
_ENTITYCANVAZRESPONSE_CANVAZ.fields_by_name[ _ENTITYCANVAZRESPONSE_CANVAZ.fields_by_name["type"].enum_type = canvaz__meta__pb2._TYPE
'type'].enum_type = canvaz__meta__pb2._TYPE _ENTITYCANVAZRESPONSE_CANVAZ.fields_by_name["artist"].message_type = _ARTIST
_ENTITYCANVAZRESPONSE_CANVAZ.fields_by_name['artist'].message_type = _ARTIST
_ENTITYCANVAZRESPONSE_CANVAZ.containing_type = _ENTITYCANVAZRESPONSE _ENTITYCANVAZRESPONSE_CANVAZ.containing_type = _ENTITYCANVAZRESPONSE
_ENTITYCANVAZRESPONSE.fields_by_name[ _ENTITYCANVAZRESPONSE.fields_by_name[
'canvases'].message_type = _ENTITYCANVAZRESPONSE_CANVAZ "canvases"
].message_type = _ENTITYCANVAZRESPONSE_CANVAZ
_ENTITYCANVAZREQUEST_ENTITY.containing_type = _ENTITYCANVAZREQUEST _ENTITYCANVAZREQUEST_ENTITY.containing_type = _ENTITYCANVAZREQUEST
_ENTITYCANVAZREQUEST.fields_by_name[ _ENTITYCANVAZREQUEST.fields_by_name[
'entities'].message_type = _ENTITYCANVAZREQUEST_ENTITY "entities"
DESCRIPTOR.message_types_by_name['Artist'] = _ARTIST ].message_type = _ENTITYCANVAZREQUEST_ENTITY
DESCRIPTOR.message_types_by_name[ DESCRIPTOR.message_types_by_name["Artist"] = _ARTIST
'EntityCanvazResponse'] = _ENTITYCANVAZRESPONSE DESCRIPTOR.message_types_by_name["EntityCanvazResponse"] = _ENTITYCANVAZRESPONSE
DESCRIPTOR.message_types_by_name['EntityCanvazRequest'] = _ENTITYCANVAZREQUEST DESCRIPTOR.message_types_by_name["EntityCanvazRequest"] = _ENTITYCANVAZREQUEST
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
Artist = _reflection.GeneratedProtocolMessageType( Artist = _reflection.GeneratedProtocolMessageType(
'Artist', "Artist",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _ARTIST, "DESCRIPTOR": _ARTIST,
'__module__': 'canvaz_pb2' "__module__": "canvaz_pb2"
# @@protoc_insertion_point(class_scope:com.spotify.canvazcache.Artist) # @@protoc_insertion_point(class_scope:com.spotify.canvazcache.Artist)
}) },
)
_sym_db.RegisterMessage(Artist) _sym_db.RegisterMessage(Artist)
EntityCanvazResponse = _reflection.GeneratedProtocolMessageType( EntityCanvazResponse = _reflection.GeneratedProtocolMessageType(
'EntityCanvazResponse', "EntityCanvazResponse",
(_message.Message, ), (_message.Message,),
{ {
'Canvaz': "Canvaz": _reflection.GeneratedProtocolMessageType(
_reflection.GeneratedProtocolMessageType( "Canvaz",
'Canvaz', (_message.Message,),
(_message.Message, ),
{ {
'DESCRIPTOR': _ENTITYCANVAZRESPONSE_CANVAZ, "DESCRIPTOR": _ENTITYCANVAZRESPONSE_CANVAZ,
'__module__': 'canvaz_pb2' "__module__": "canvaz_pb2"
# @@protoc_insertion_point(class_scope:com.spotify.canvazcache.EntityCanvazResponse.Canvaz) # @@protoc_insertion_point(class_scope:com.spotify.canvazcache.EntityCanvazResponse.Canvaz)
}), },
'DESCRIPTOR': ),
_ENTITYCANVAZRESPONSE, "DESCRIPTOR": _ENTITYCANVAZRESPONSE,
'__module__': "__module__": "canvaz_pb2"
'canvaz_pb2'
# @@protoc_insertion_point(class_scope:com.spotify.canvazcache.EntityCanvazResponse) # @@protoc_insertion_point(class_scope:com.spotify.canvazcache.EntityCanvazResponse)
}) },
)
_sym_db.RegisterMessage(EntityCanvazResponse) _sym_db.RegisterMessage(EntityCanvazResponse)
_sym_db.RegisterMessage(EntityCanvazResponse.Canvaz) _sym_db.RegisterMessage(EntityCanvazResponse.Canvaz)
EntityCanvazRequest = _reflection.GeneratedProtocolMessageType( EntityCanvazRequest = _reflection.GeneratedProtocolMessageType(
'EntityCanvazRequest', "EntityCanvazRequest",
(_message.Message, ), (_message.Message,),
{ {
'Entity': "Entity": _reflection.GeneratedProtocolMessageType(
_reflection.GeneratedProtocolMessageType( "Entity",
'Entity', (_message.Message,),
(_message.Message, ),
{ {
'DESCRIPTOR': _ENTITYCANVAZREQUEST_ENTITY, "DESCRIPTOR": _ENTITYCANVAZREQUEST_ENTITY,
'__module__': 'canvaz_pb2' "__module__": "canvaz_pb2"
# @@protoc_insertion_point(class_scope:com.spotify.canvazcache.EntityCanvazRequest.Entity) # @@protoc_insertion_point(class_scope:com.spotify.canvazcache.EntityCanvazRequest.Entity)
}), },
'DESCRIPTOR': ),
_ENTITYCANVAZREQUEST, "DESCRIPTOR": _ENTITYCANVAZREQUEST,
'__module__': "__module__": "canvaz_pb2"
'canvaz_pb2'
# @@protoc_insertion_point(class_scope:com.spotify.canvazcache.EntityCanvazRequest) # @@protoc_insertion_point(class_scope:com.spotify.canvazcache.EntityCanvazRequest)
}) },
)
_sym_db.RegisterMessage(EntityCanvazRequest) _sym_db.RegisterMessage(EntityCanvazRequest)
_sym_db.RegisterMessage(EntityCanvazRequest.Entity) _sym_db.RegisterMessage(EntityCanvazRequest.Entity)

View File

@ -7,61 +7,67 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='canvaz-meta.proto', name="canvaz-meta.proto",
package='com.spotify.canvaz', package="com.spotify.canvaz",
syntax='proto3', syntax="proto3",
serialized_options=b'\n\022com.spotify.canvazH\002', serialized_options=b"\n\022com.spotify.canvazH\002",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x11\x63\x61nvaz-meta.proto\x12\x12\x63om.spotify.canvaz*R\n\x04Type\x12\t\n\x05IMAGE\x10\x00\x12\t\n\x05VIDEO\x10\x01\x12\x11\n\rVIDEO_LOOPING\x10\x02\x12\x18\n\x14VIDEO_LOOPING_RANDOM\x10\x03\x12\x07\n\x03GIF\x10\x04\x42\x16\n\x12\x63om.spotify.canvazH\x02\x62\x06proto3' serialized_pb=b"\n\x11\x63\x61nvaz-meta.proto\x12\x12\x63om.spotify.canvaz*R\n\x04Type\x12\t\n\x05IMAGE\x10\x00\x12\t\n\x05VIDEO\x10\x01\x12\x11\n\rVIDEO_LOOPING\x10\x02\x12\x18\n\x14VIDEO_LOOPING_RANDOM\x10\x03\x12\x07\n\x03GIF\x10\x04\x42\x16\n\x12\x63om.spotify.canvazH\x02\x62\x06proto3",
) )
_TYPE = _descriptor.EnumDescriptor( _TYPE = _descriptor.EnumDescriptor(
name='Type', name="Type",
full_name='com.spotify.canvaz.Type', full_name="com.spotify.canvaz.Type",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
values=[ values=[
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='IMAGE', name="IMAGE",
index=0, index=0,
number=0, number=0,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='VIDEO', name="VIDEO",
index=1, index=1,
number=1, number=1,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='VIDEO_LOOPING', name="VIDEO_LOOPING",
index=2, index=2,
number=2, number=2,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='VIDEO_LOOPING_RANDOM', name="VIDEO_LOOPING_RANDOM",
index=3, index=3,
number=3, number=3,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='GIF', name="GIF",
index=4, index=4,
number=4, number=4,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
containing_type=None, containing_type=None,
serialized_options=None, serialized_options=None,
@ -77,7 +83,7 @@ VIDEO_LOOPING = 2
VIDEO_LOOPING_RANDOM = 3 VIDEO_LOOPING_RANDOM = 3
GIF = 4 GIF = 4
DESCRIPTOR.enum_types_by_name['Type'] = _TYPE DESCRIPTOR.enum_types_by_name["Type"] = _TYPE
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
DESCRIPTOR._options = None DESCRIPTOR._options = None

View File

@ -8,41 +8,43 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='context.proto', name="context.proto",
package='spotify.player.proto', package="spotify.player.proto",
syntax='proto2', syntax="proto2",
serialized_options=b'\n\023com.spotify.contextH\002', serialized_options=b"\n\023com.spotify.contextH\002",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\rcontext.proto\x12\x14spotify.player.proto\x1a\x12\x63ontext_page.proto\x1a\x12restrictions.proto\"\x90\x02\n\x07\x43ontext\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12=\n\x08metadata\x18\x03 \x03(\x0b\x32+.spotify.player.proto.Context.MetadataEntry\x12\x38\n\x0crestrictions\x18\x04 \x01(\x0b\x32\".spotify.player.proto.Restrictions\x12\x30\n\x05pages\x18\x05 \x03(\x0b\x32!.spotify.player.proto.ContextPage\x12\x0f\n\x07loading\x18\x06 \x01(\x08\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x13\x63om.spotify.contextH\x02', serialized_pb=b'\n\rcontext.proto\x12\x14spotify.player.proto\x1a\x12\x63ontext_page.proto\x1a\x12restrictions.proto"\x90\x02\n\x07\x43ontext\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12=\n\x08metadata\x18\x03 \x03(\x0b\x32+.spotify.player.proto.Context.MetadataEntry\x12\x38\n\x0crestrictions\x18\x04 \x01(\x0b\x32".spotify.player.proto.Restrictions\x12\x30\n\x05pages\x18\x05 \x03(\x0b\x32!.spotify.player.proto.ContextPage\x12\x0f\n\x07loading\x18\x06 \x01(\x08\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x13\x63om.spotify.contextH\x02',
dependencies=[ dependencies=[
context__page__pb2.DESCRIPTOR, context__page__pb2.DESCRIPTOR,
restrictions__pb2.DESCRIPTOR, restrictions__pb2.DESCRIPTOR,
]) ],
)
_CONTEXT_METADATAENTRY = _descriptor.Descriptor( _CONTEXT_METADATAENTRY = _descriptor.Descriptor(
name='MetadataEntry', name="MetadataEntry",
full_name='spotify.player.proto.Context.MetadataEntry', full_name="spotify.player.proto.Context.MetadataEntry",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='key', name="key",
full_name='spotify.player.proto.Context.MetadataEntry.key', full_name="spotify.player.proto.Context.MetadataEntry.key",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -50,17 +52,18 @@ _CONTEXT_METADATAENTRY = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='value', name="value",
full_name='spotify.player.proto.Context.MetadataEntry.value', full_name="spotify.player.proto.Context.MetadataEntry.value",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -68,14 +71,15 @@ _CONTEXT_METADATAENTRY = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=b'8\001', serialized_options=b"8\001",
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=305, serialized_start=305,
@ -83,23 +87,23 @@ _CONTEXT_METADATAENTRY = _descriptor.Descriptor(
) )
_CONTEXT = _descriptor.Descriptor( _CONTEXT = _descriptor.Descriptor(
name='Context', name="Context",
full_name='spotify.player.proto.Context', full_name="spotify.player.proto.Context",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='uri', name="uri",
full_name='spotify.player.proto.Context.uri', full_name="spotify.player.proto.Context.uri",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -107,17 +111,18 @@ _CONTEXT = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='url', name="url",
full_name='spotify.player.proto.Context.url', full_name="spotify.player.proto.Context.url",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -125,10 +130,11 @@ _CONTEXT = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='metadata', name="metadata",
full_name='spotify.player.proto.Context.metadata', full_name="spotify.player.proto.Context.metadata",
index=2, index=2,
number=3, number=3,
type=11, type=11,
@ -143,10 +149,11 @@ _CONTEXT = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='restrictions', name="restrictions",
full_name='spotify.player.proto.Context.restrictions', full_name="spotify.player.proto.Context.restrictions",
index=3, index=3,
number=4, number=4,
type=11, type=11,
@ -161,10 +168,11 @@ _CONTEXT = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='pages', name="pages",
full_name='spotify.player.proto.Context.pages', full_name="spotify.player.proto.Context.pages",
index=4, index=4,
number=5, number=5,
type=11, type=11,
@ -179,10 +187,11 @@ _CONTEXT = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='loading', name="loading",
full_name='spotify.player.proto.Context.loading', full_name="spotify.player.proto.Context.loading",
index=5, index=5,
number=6, number=6,
type=8, type=8,
@ -197,7 +206,8 @@ _CONTEXT = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[ nested_types=[
@ -206,7 +216,7 @@ _CONTEXT = _descriptor.Descriptor(
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=80, serialized_start=80,
@ -214,32 +224,30 @@ _CONTEXT = _descriptor.Descriptor(
) )
_CONTEXT_METADATAENTRY.containing_type = _CONTEXT _CONTEXT_METADATAENTRY.containing_type = _CONTEXT
_CONTEXT.fields_by_name['metadata'].message_type = _CONTEXT_METADATAENTRY _CONTEXT.fields_by_name["metadata"].message_type = _CONTEXT_METADATAENTRY
_CONTEXT.fields_by_name[ _CONTEXT.fields_by_name["restrictions"].message_type = restrictions__pb2._RESTRICTIONS
'restrictions'].message_type = restrictions__pb2._RESTRICTIONS _CONTEXT.fields_by_name["pages"].message_type = context__page__pb2._CONTEXTPAGE
_CONTEXT.fields_by_name['pages'].message_type = context__page__pb2._CONTEXTPAGE DESCRIPTOR.message_types_by_name["Context"] = _CONTEXT
DESCRIPTOR.message_types_by_name['Context'] = _CONTEXT
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
Context = _reflection.GeneratedProtocolMessageType( Context = _reflection.GeneratedProtocolMessageType(
'Context', "Context",
(_message.Message, ), (_message.Message,),
{ {
'MetadataEntry': "MetadataEntry": _reflection.GeneratedProtocolMessageType(
_reflection.GeneratedProtocolMessageType( "MetadataEntry",
'MetadataEntry', (_message.Message,),
(_message.Message, ),
{ {
'DESCRIPTOR': _CONTEXT_METADATAENTRY, "DESCRIPTOR": _CONTEXT_METADATAENTRY,
'__module__': 'context_pb2' "__module__": "context_pb2"
# @@protoc_insertion_point(class_scope:spotify.player.proto.Context.MetadataEntry) # @@protoc_insertion_point(class_scope:spotify.player.proto.Context.MetadataEntry)
}), },
'DESCRIPTOR': ),
_CONTEXT, "DESCRIPTOR": _CONTEXT,
'__module__': "__module__": "context_pb2"
'context_pb2'
# @@protoc_insertion_point(class_scope:spotify.player.proto.Context) # @@protoc_insertion_point(class_scope:spotify.player.proto.Context)
}) },
)
_sym_db.RegisterMessage(Context) _sym_db.RegisterMessage(Context)
_sym_db.RegisterMessage(Context.MetadataEntry) _sym_db.RegisterMessage(Context.MetadataEntry)

View File

@ -7,40 +7,42 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='context_page.proto', name="context_page.proto",
package='spotify.player.proto', package="spotify.player.proto",
syntax='proto2', syntax="proto2",
serialized_options=b'\n\023com.spotify.contextH\002', serialized_options=b"\n\023com.spotify.contextH\002",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x12\x63ontext_page.proto\x12\x14spotify.player.proto\x1a\x13\x63ontext_track.proto\"\xef\x01\n\x0b\x43ontextPage\x12\x10\n\x08page_url\x18\x01 \x01(\t\x12\x15\n\rnext_page_url\x18\x02 \x01(\t\x12\x41\n\x08metadata\x18\x03 \x03(\x0b\x32/.spotify.player.proto.ContextPage.MetadataEntry\x12\x32\n\x06tracks\x18\x04 \x03(\x0b\x32\".spotify.player.proto.ContextTrack\x12\x0f\n\x07loading\x18\x05 \x01(\x08\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x13\x63om.spotify.contextH\x02', serialized_pb=b'\n\x12\x63ontext_page.proto\x12\x14spotify.player.proto\x1a\x13\x63ontext_track.proto"\xef\x01\n\x0b\x43ontextPage\x12\x10\n\x08page_url\x18\x01 \x01(\t\x12\x15\n\rnext_page_url\x18\x02 \x01(\t\x12\x41\n\x08metadata\x18\x03 \x03(\x0b\x32/.spotify.player.proto.ContextPage.MetadataEntry\x12\x32\n\x06tracks\x18\x04 \x03(\x0b\x32".spotify.player.proto.ContextTrack\x12\x0f\n\x07loading\x18\x05 \x01(\x08\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x13\x63om.spotify.contextH\x02',
dependencies=[ dependencies=[
context__track__pb2.DESCRIPTOR, context__track__pb2.DESCRIPTOR,
]) ],
)
_CONTEXTPAGE_METADATAENTRY = _descriptor.Descriptor( _CONTEXTPAGE_METADATAENTRY = _descriptor.Descriptor(
name='MetadataEntry', name="MetadataEntry",
full_name='spotify.player.proto.ContextPage.MetadataEntry', full_name="spotify.player.proto.ContextPage.MetadataEntry",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='key', name="key",
full_name='spotify.player.proto.ContextPage.MetadataEntry.key', full_name="spotify.player.proto.ContextPage.MetadataEntry.key",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -48,17 +50,18 @@ _CONTEXTPAGE_METADATAENTRY = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='value', name="value",
full_name='spotify.player.proto.ContextPage.MetadataEntry.value', full_name="spotify.player.proto.ContextPage.MetadataEntry.value",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -66,14 +69,15 @@ _CONTEXTPAGE_METADATAENTRY = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=b'8\001', serialized_options=b"8\001",
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=258, serialized_start=258,
@ -81,23 +85,23 @@ _CONTEXTPAGE_METADATAENTRY = _descriptor.Descriptor(
) )
_CONTEXTPAGE = _descriptor.Descriptor( _CONTEXTPAGE = _descriptor.Descriptor(
name='ContextPage', name="ContextPage",
full_name='spotify.player.proto.ContextPage', full_name="spotify.player.proto.ContextPage",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='page_url', name="page_url",
full_name='spotify.player.proto.ContextPage.page_url', full_name="spotify.player.proto.ContextPage.page_url",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -105,17 +109,18 @@ _CONTEXTPAGE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='next_page_url', name="next_page_url",
full_name='spotify.player.proto.ContextPage.next_page_url', full_name="spotify.player.proto.ContextPage.next_page_url",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -123,10 +128,11 @@ _CONTEXTPAGE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='metadata', name="metadata",
full_name='spotify.player.proto.ContextPage.metadata', full_name="spotify.player.proto.ContextPage.metadata",
index=2, index=2,
number=3, number=3,
type=11, type=11,
@ -141,10 +147,11 @@ _CONTEXTPAGE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='tracks', name="tracks",
full_name='spotify.player.proto.ContextPage.tracks', full_name="spotify.player.proto.ContextPage.tracks",
index=3, index=3,
number=4, number=4,
type=11, type=11,
@ -159,10 +166,11 @@ _CONTEXTPAGE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='loading', name="loading",
full_name='spotify.player.proto.ContextPage.loading', full_name="spotify.player.proto.ContextPage.loading",
index=4, index=4,
number=5, number=5,
type=8, type=8,
@ -177,7 +185,8 @@ _CONTEXTPAGE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[ nested_types=[
@ -186,7 +195,7 @@ _CONTEXTPAGE = _descriptor.Descriptor(
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=66, serialized_start=66,
@ -194,32 +203,29 @@ _CONTEXTPAGE = _descriptor.Descriptor(
) )
_CONTEXTPAGE_METADATAENTRY.containing_type = _CONTEXTPAGE _CONTEXTPAGE_METADATAENTRY.containing_type = _CONTEXTPAGE
_CONTEXTPAGE.fields_by_name[ _CONTEXTPAGE.fields_by_name["metadata"].message_type = _CONTEXTPAGE_METADATAENTRY
'metadata'].message_type = _CONTEXTPAGE_METADATAENTRY _CONTEXTPAGE.fields_by_name["tracks"].message_type = context__track__pb2._CONTEXTTRACK
_CONTEXTPAGE.fields_by_name[ DESCRIPTOR.message_types_by_name["ContextPage"] = _CONTEXTPAGE
'tracks'].message_type = context__track__pb2._CONTEXTTRACK
DESCRIPTOR.message_types_by_name['ContextPage'] = _CONTEXTPAGE
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
ContextPage = _reflection.GeneratedProtocolMessageType( ContextPage = _reflection.GeneratedProtocolMessageType(
'ContextPage', "ContextPage",
(_message.Message, ), (_message.Message,),
{ {
'MetadataEntry': "MetadataEntry": _reflection.GeneratedProtocolMessageType(
_reflection.GeneratedProtocolMessageType( "MetadataEntry",
'MetadataEntry', (_message.Message,),
(_message.Message, ),
{ {
'DESCRIPTOR': _CONTEXTPAGE_METADATAENTRY, "DESCRIPTOR": _CONTEXTPAGE_METADATAENTRY,
'__module__': 'context_page_pb2' "__module__": "context_page_pb2"
# @@protoc_insertion_point(class_scope:spotify.player.proto.ContextPage.MetadataEntry) # @@protoc_insertion_point(class_scope:spotify.player.proto.ContextPage.MetadataEntry)
}), },
'DESCRIPTOR': ),
_CONTEXTPAGE, "DESCRIPTOR": _CONTEXTPAGE,
'__module__': "__module__": "context_page_pb2"
'context_page_pb2'
# @@protoc_insertion_point(class_scope:spotify.player.proto.ContextPage) # @@protoc_insertion_point(class_scope:spotify.player.proto.ContextPage)
}) },
)
_sym_db.RegisterMessage(ContextPage) _sym_db.RegisterMessage(ContextPage)
_sym_db.RegisterMessage(ContextPage.MetadataEntry) _sym_db.RegisterMessage(ContextPage.MetadataEntry)

View File

@ -6,30 +6,31 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='context_player_options.proto', name="context_player_options.proto",
package='spotify.player.proto', package="spotify.player.proto",
syntax='proto2', syntax="proto2",
serialized_options=b'\n\023com.spotify.contextH\002', serialized_options=b"\n\023com.spotify.contextH\002",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x1c\x63ontext_player_options.proto\x12\x14spotify.player.proto\"e\n\x14\x43ontextPlayerOptions\x12\x19\n\x11shuffling_context\x18\x01 \x01(\x08\x12\x19\n\x11repeating_context\x18\x02 \x01(\x08\x12\x17\n\x0frepeating_track\x18\x03 \x01(\x08\"m\n\x1c\x43ontextPlayerOptionOverrides\x12\x19\n\x11shuffling_context\x18\x01 \x01(\x08\x12\x19\n\x11repeating_context\x18\x02 \x01(\x08\x12\x17\n\x0frepeating_track\x18\x03 \x01(\x08\x42\x17\n\x13\x63om.spotify.contextH\x02' serialized_pb=b'\n\x1c\x63ontext_player_options.proto\x12\x14spotify.player.proto"e\n\x14\x43ontextPlayerOptions\x12\x19\n\x11shuffling_context\x18\x01 \x01(\x08\x12\x19\n\x11repeating_context\x18\x02 \x01(\x08\x12\x17\n\x0frepeating_track\x18\x03 \x01(\x08"m\n\x1c\x43ontextPlayerOptionOverrides\x12\x19\n\x11shuffling_context\x18\x01 \x01(\x08\x12\x19\n\x11repeating_context\x18\x02 \x01(\x08\x12\x17\n\x0frepeating_track\x18\x03 \x01(\x08\x42\x17\n\x13\x63om.spotify.contextH\x02',
) )
_CONTEXTPLAYEROPTIONS = _descriptor.Descriptor( _CONTEXTPLAYEROPTIONS = _descriptor.Descriptor(
name='ContextPlayerOptions', name="ContextPlayerOptions",
full_name='spotify.player.proto.ContextPlayerOptions', full_name="spotify.player.proto.ContextPlayerOptions",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='shuffling_context', name="shuffling_context",
full_name='spotify.player.proto.ContextPlayerOptions.shuffling_context', full_name="spotify.player.proto.ContextPlayerOptions.shuffling_context",
index=0, index=0,
number=1, number=1,
type=8, type=8,
@ -44,10 +45,11 @@ _CONTEXTPLAYEROPTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='repeating_context', name="repeating_context",
full_name='spotify.player.proto.ContextPlayerOptions.repeating_context', full_name="spotify.player.proto.ContextPlayerOptions.repeating_context",
index=1, index=1,
number=2, number=2,
type=8, type=8,
@ -62,10 +64,11 @@ _CONTEXTPLAYEROPTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='repeating_track', name="repeating_track",
full_name='spotify.player.proto.ContextPlayerOptions.repeating_track', full_name="spotify.player.proto.ContextPlayerOptions.repeating_track",
index=2, index=2,
number=3, number=3,
type=8, type=8,
@ -80,14 +83,15 @@ _CONTEXTPLAYEROPTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=54, serialized_start=54,
@ -95,16 +99,16 @@ _CONTEXTPLAYEROPTIONS = _descriptor.Descriptor(
) )
_CONTEXTPLAYEROPTIONOVERRIDES = _descriptor.Descriptor( _CONTEXTPLAYEROPTIONOVERRIDES = _descriptor.Descriptor(
name='ContextPlayerOptionOverrides', name="ContextPlayerOptionOverrides",
full_name='spotify.player.proto.ContextPlayerOptionOverrides', full_name="spotify.player.proto.ContextPlayerOptionOverrides",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='shuffling_context', name="shuffling_context",
full_name='spotify.player.proto.ContextPlayerOptionOverrides.shuffling_context', full_name="spotify.player.proto.ContextPlayerOptionOverrides.shuffling_context",
index=0, index=0,
number=1, number=1,
type=8, type=8,
@ -119,10 +123,11 @@ _CONTEXTPLAYEROPTIONOVERRIDES = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='repeating_context', name="repeating_context",
full_name='spotify.player.proto.ContextPlayerOptionOverrides.repeating_context', full_name="spotify.player.proto.ContextPlayerOptionOverrides.repeating_context",
index=1, index=1,
number=2, number=2,
type=8, type=8,
@ -137,10 +142,11 @@ _CONTEXTPLAYEROPTIONOVERRIDES = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='repeating_track', name="repeating_track",
full_name='spotify.player.proto.ContextPlayerOptionOverrides.repeating_track', full_name="spotify.player.proto.ContextPlayerOptionOverrides.repeating_track",
index=2, index=2,
number=3, number=3,
type=8, type=8,
@ -155,44 +161,47 @@ _CONTEXTPLAYEROPTIONOVERRIDES = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=157, serialized_start=157,
serialized_end=266, serialized_end=266,
) )
DESCRIPTOR.message_types_by_name["ContextPlayerOptions"] = _CONTEXTPLAYEROPTIONS
DESCRIPTOR.message_types_by_name[ DESCRIPTOR.message_types_by_name[
'ContextPlayerOptions'] = _CONTEXTPLAYEROPTIONS "ContextPlayerOptionOverrides"
DESCRIPTOR.message_types_by_name[ ] = _CONTEXTPLAYEROPTIONOVERRIDES
'ContextPlayerOptionOverrides'] = _CONTEXTPLAYEROPTIONOVERRIDES
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
ContextPlayerOptions = _reflection.GeneratedProtocolMessageType( ContextPlayerOptions = _reflection.GeneratedProtocolMessageType(
'ContextPlayerOptions', "ContextPlayerOptions",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _CONTEXTPLAYEROPTIONS, "DESCRIPTOR": _CONTEXTPLAYEROPTIONS,
'__module__': 'context_player_options_pb2' "__module__": "context_player_options_pb2"
# @@protoc_insertion_point(class_scope:spotify.player.proto.ContextPlayerOptions) # @@protoc_insertion_point(class_scope:spotify.player.proto.ContextPlayerOptions)
}) },
)
_sym_db.RegisterMessage(ContextPlayerOptions) _sym_db.RegisterMessage(ContextPlayerOptions)
ContextPlayerOptionOverrides = _reflection.GeneratedProtocolMessageType( ContextPlayerOptionOverrides = _reflection.GeneratedProtocolMessageType(
'ContextPlayerOptionOverrides', "ContextPlayerOptionOverrides",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _CONTEXTPLAYEROPTIONOVERRIDES, "DESCRIPTOR": _CONTEXTPLAYEROPTIONOVERRIDES,
'__module__': 'context_player_options_pb2' "__module__": "context_player_options_pb2"
# @@protoc_insertion_point(class_scope:spotify.player.proto.ContextPlayerOptionOverrides) # @@protoc_insertion_point(class_scope:spotify.player.proto.ContextPlayerOptionOverrides)
}) },
)
_sym_db.RegisterMessage(ContextPlayerOptionOverrides) _sym_db.RegisterMessage(ContextPlayerOptionOverrides)
DESCRIPTOR._options = None DESCRIPTOR._options = None

View File

@ -6,37 +6,38 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='context_track.proto', name="context_track.proto",
package='spotify.player.proto', package="spotify.player.proto",
syntax='proto2', syntax="proto2",
serialized_options=b'\n\023com.spotify.contextH\002', serialized_options=b"\n\023com.spotify.contextH\002",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x13\x63ontext_track.proto\x12\x14spotify.player.proto\"\xaa\x01\n\x0c\x43ontextTrack\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x0b\n\x03uid\x18\x02 \x01(\t\x12\x0b\n\x03gid\x18\x03 \x01(\x0c\x12\x42\n\x08metadata\x18\x04 \x03(\x0b\x32\x30.spotify.player.proto.ContextTrack.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x13\x63om.spotify.contextH\x02' serialized_pb=b'\n\x13\x63ontext_track.proto\x12\x14spotify.player.proto"\xaa\x01\n\x0c\x43ontextTrack\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x0b\n\x03uid\x18\x02 \x01(\t\x12\x0b\n\x03gid\x18\x03 \x01(\x0c\x12\x42\n\x08metadata\x18\x04 \x03(\x0b\x32\x30.spotify.player.proto.ContextTrack.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x13\x63om.spotify.contextH\x02',
) )
_CONTEXTTRACK_METADATAENTRY = _descriptor.Descriptor( _CONTEXTTRACK_METADATAENTRY = _descriptor.Descriptor(
name='MetadataEntry', name="MetadataEntry",
full_name='spotify.player.proto.ContextTrack.MetadataEntry', full_name="spotify.player.proto.ContextTrack.MetadataEntry",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='key', name="key",
full_name='spotify.player.proto.ContextTrack.MetadataEntry.key', full_name="spotify.player.proto.ContextTrack.MetadataEntry.key",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -44,17 +45,18 @@ _CONTEXTTRACK_METADATAENTRY = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='value', name="value",
full_name='spotify.player.proto.ContextTrack.MetadataEntry.value', full_name="spotify.player.proto.ContextTrack.MetadataEntry.value",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -62,14 +64,15 @@ _CONTEXTTRACK_METADATAENTRY = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=b'8\001', serialized_options=b"8\001",
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=169, serialized_start=169,
@ -77,23 +80,23 @@ _CONTEXTTRACK_METADATAENTRY = _descriptor.Descriptor(
) )
_CONTEXTTRACK = _descriptor.Descriptor( _CONTEXTTRACK = _descriptor.Descriptor(
name='ContextTrack', name="ContextTrack",
full_name='spotify.player.proto.ContextTrack', full_name="spotify.player.proto.ContextTrack",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='uri', name="uri",
full_name='spotify.player.proto.ContextTrack.uri', full_name="spotify.player.proto.ContextTrack.uri",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -101,17 +104,18 @@ _CONTEXTTRACK = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='uid', name="uid",
full_name='spotify.player.proto.ContextTrack.uid', full_name="spotify.player.proto.ContextTrack.uid",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -119,10 +123,11 @@ _CONTEXTTRACK = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='gid', name="gid",
full_name='spotify.player.proto.ContextTrack.gid', full_name="spotify.player.proto.ContextTrack.gid",
index=2, index=2,
number=3, number=3,
type=12, type=12,
@ -137,10 +142,11 @@ _CONTEXTTRACK = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='metadata', name="metadata",
full_name='spotify.player.proto.ContextTrack.metadata', full_name="spotify.player.proto.ContextTrack.metadata",
index=3, index=3,
number=4, number=4,
type=11, type=11,
@ -155,7 +161,8 @@ _CONTEXTTRACK = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[ nested_types=[
@ -164,7 +171,7 @@ _CONTEXTTRACK = _descriptor.Descriptor(
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=46, serialized_start=46,
@ -172,30 +179,28 @@ _CONTEXTTRACK = _descriptor.Descriptor(
) )
_CONTEXTTRACK_METADATAENTRY.containing_type = _CONTEXTTRACK _CONTEXTTRACK_METADATAENTRY.containing_type = _CONTEXTTRACK
_CONTEXTTRACK.fields_by_name[ _CONTEXTTRACK.fields_by_name["metadata"].message_type = _CONTEXTTRACK_METADATAENTRY
'metadata'].message_type = _CONTEXTTRACK_METADATAENTRY DESCRIPTOR.message_types_by_name["ContextTrack"] = _CONTEXTTRACK
DESCRIPTOR.message_types_by_name['ContextTrack'] = _CONTEXTTRACK
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
ContextTrack = _reflection.GeneratedProtocolMessageType( ContextTrack = _reflection.GeneratedProtocolMessageType(
'ContextTrack', "ContextTrack",
(_message.Message, ), (_message.Message,),
{ {
'MetadataEntry': "MetadataEntry": _reflection.GeneratedProtocolMessageType(
_reflection.GeneratedProtocolMessageType( "MetadataEntry",
'MetadataEntry', (_message.Message,),
(_message.Message, ),
{ {
'DESCRIPTOR': _CONTEXTTRACK_METADATAENTRY, "DESCRIPTOR": _CONTEXTTRACK_METADATAENTRY,
'__module__': 'context_track_pb2' "__module__": "context_track_pb2"
# @@protoc_insertion_point(class_scope:spotify.player.proto.ContextTrack.MetadataEntry) # @@protoc_insertion_point(class_scope:spotify.player.proto.ContextTrack.MetadataEntry)
}), },
'DESCRIPTOR': ),
_CONTEXTTRACK, "DESCRIPTOR": _CONTEXTTRACK,
'__module__': "__module__": "context_track_pb2"
'context_track_pb2'
# @@protoc_insertion_point(class_scope:spotify.player.proto.ContextTrack) # @@protoc_insertion_point(class_scope:spotify.player.proto.ContextTrack)
}) },
)
_sym_db.RegisterMessage(ContextTrack) _sym_db.RegisterMessage(ContextTrack)
_sym_db.RegisterMessage(ContextTrack.MetadataEntry) _sym_db.RegisterMessage(ContextTrack.MetadataEntry)

View File

@ -6,37 +6,38 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='play_origin.proto', name="play_origin.proto",
package='spotify.player.proto', package="spotify.player.proto",
syntax='proto2', syntax="proto2",
serialized_options=b'\n\023com.spotify.contextH\002', serialized_options=b"\n\023com.spotify.contextH\002",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x11play_origin.proto\x12\x14spotify.player.proto\"\xbf\x01\n\nPlayOrigin\x12\x1a\n\x12\x66\x65\x61ture_identifier\x18\x01 \x01(\t\x12\x17\n\x0f\x66\x65\x61ture_version\x18\x02 \x01(\t\x12\x10\n\x08view_uri\x18\x03 \x01(\t\x12\x19\n\x11\x65xternal_referrer\x18\x04 \x01(\t\x12\x1b\n\x13referrer_identifier\x18\x05 \x01(\t\x12\x19\n\x11\x64\x65vice_identifier\x18\x06 \x01(\t\x12\x17\n\x0f\x66\x65\x61ture_classes\x18\x07 \x03(\tB\x17\n\x13\x63om.spotify.contextH\x02' serialized_pb=b'\n\x11play_origin.proto\x12\x14spotify.player.proto"\xbf\x01\n\nPlayOrigin\x12\x1a\n\x12\x66\x65\x61ture_identifier\x18\x01 \x01(\t\x12\x17\n\x0f\x66\x65\x61ture_version\x18\x02 \x01(\t\x12\x10\n\x08view_uri\x18\x03 \x01(\t\x12\x19\n\x11\x65xternal_referrer\x18\x04 \x01(\t\x12\x1b\n\x13referrer_identifier\x18\x05 \x01(\t\x12\x19\n\x11\x64\x65vice_identifier\x18\x06 \x01(\t\x12\x17\n\x0f\x66\x65\x61ture_classes\x18\x07 \x03(\tB\x17\n\x13\x63om.spotify.contextH\x02',
) )
_PLAYORIGIN = _descriptor.Descriptor( _PLAYORIGIN = _descriptor.Descriptor(
name='PlayOrigin', name="PlayOrigin",
full_name='spotify.player.proto.PlayOrigin', full_name="spotify.player.proto.PlayOrigin",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='feature_identifier', name="feature_identifier",
full_name='spotify.player.proto.PlayOrigin.feature_identifier', full_name="spotify.player.proto.PlayOrigin.feature_identifier",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -44,17 +45,18 @@ _PLAYORIGIN = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='feature_version', name="feature_version",
full_name='spotify.player.proto.PlayOrigin.feature_version', full_name="spotify.player.proto.PlayOrigin.feature_version",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -62,17 +64,18 @@ _PLAYORIGIN = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='view_uri', name="view_uri",
full_name='spotify.player.proto.PlayOrigin.view_uri', full_name="spotify.player.proto.PlayOrigin.view_uri",
index=2, index=2,
number=3, number=3,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -80,17 +83,18 @@ _PLAYORIGIN = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='external_referrer', name="external_referrer",
full_name='spotify.player.proto.PlayOrigin.external_referrer', full_name="spotify.player.proto.PlayOrigin.external_referrer",
index=3, index=3,
number=4, number=4,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -98,17 +102,18 @@ _PLAYORIGIN = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='referrer_identifier', name="referrer_identifier",
full_name='spotify.player.proto.PlayOrigin.referrer_identifier', full_name="spotify.player.proto.PlayOrigin.referrer_identifier",
index=4, index=4,
number=5, number=5,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -116,17 +121,18 @@ _PLAYORIGIN = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='device_identifier', name="device_identifier",
full_name='spotify.player.proto.PlayOrigin.device_identifier', full_name="spotify.player.proto.PlayOrigin.device_identifier",
index=5, index=5,
number=6, number=6,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -134,10 +140,11 @@ _PLAYORIGIN = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='feature_classes', name="feature_classes",
full_name='spotify.player.proto.PlayOrigin.feature_classes', full_name="spotify.player.proto.PlayOrigin.feature_classes",
index=6, index=6,
number=7, number=7,
type=9, type=9,
@ -152,31 +159,33 @@ _PLAYORIGIN = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=44, serialized_start=44,
serialized_end=235, serialized_end=235,
) )
DESCRIPTOR.message_types_by_name['PlayOrigin'] = _PLAYORIGIN DESCRIPTOR.message_types_by_name["PlayOrigin"] = _PLAYORIGIN
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
PlayOrigin = _reflection.GeneratedProtocolMessageType( PlayOrigin = _reflection.GeneratedProtocolMessageType(
'PlayOrigin', "PlayOrigin",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _PLAYORIGIN, "DESCRIPTOR": _PLAYORIGIN,
'__module__': 'play_origin_pb2' "__module__": "play_origin_pb2"
# @@protoc_insertion_point(class_scope:spotify.player.proto.PlayOrigin) # @@protoc_insertion_point(class_scope:spotify.player.proto.PlayOrigin)
}) },
)
_sym_db.RegisterMessage(PlayOrigin) _sym_db.RegisterMessage(PlayOrigin)
DESCRIPTOR._options = None DESCRIPTOR._options = None

View File

@ -7,33 +7,35 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='playback.proto', name="playback.proto",
package='spotify.player.proto.transfer', package="spotify.player.proto.transfer",
syntax='proto2', syntax="proto2",
serialized_options=b'\n\024com.spotify.transferH\002', serialized_options=b"\n\024com.spotify.transferH\002",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x0eplayback.proto\x12\x1dspotify.player.proto.transfer\x1a\x13\x63ontext_track.proto\"\xa5\x01\n\x08Playback\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12 \n\x18position_as_of_timestamp\x18\x02 \x01(\x05\x12\x16\n\x0eplayback_speed\x18\x03 \x01(\x01\x12\x11\n\tis_paused\x18\x04 \x01(\x08\x12\x39\n\rcurrent_track\x18\x05 \x01(\x0b\x32\".spotify.player.proto.ContextTrackB\x18\n\x14\x63om.spotify.transferH\x02', serialized_pb=b'\n\x0eplayback.proto\x12\x1dspotify.player.proto.transfer\x1a\x13\x63ontext_track.proto"\xa5\x01\n\x08Playback\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12 \n\x18position_as_of_timestamp\x18\x02 \x01(\x05\x12\x16\n\x0eplayback_speed\x18\x03 \x01(\x01\x12\x11\n\tis_paused\x18\x04 \x01(\x08\x12\x39\n\rcurrent_track\x18\x05 \x01(\x0b\x32".spotify.player.proto.ContextTrackB\x18\n\x14\x63om.spotify.transferH\x02',
dependencies=[ dependencies=[
context__track__pb2.DESCRIPTOR, context__track__pb2.DESCRIPTOR,
]) ],
)
_PLAYBACK = _descriptor.Descriptor( _PLAYBACK = _descriptor.Descriptor(
name='Playback', name="Playback",
full_name='spotify.player.proto.transfer.Playback', full_name="spotify.player.proto.transfer.Playback",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='timestamp', name="timestamp",
full_name='spotify.player.proto.transfer.Playback.timestamp', full_name="spotify.player.proto.transfer.Playback.timestamp",
index=0, index=0,
number=1, number=1,
type=3, type=3,
@ -48,10 +50,11 @@ _PLAYBACK = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='position_as_of_timestamp', name="position_as_of_timestamp",
full_name='spotify.player.proto.transfer.Playback.position_as_of_timestamp', full_name="spotify.player.proto.transfer.Playback.position_as_of_timestamp",
index=1, index=1,
number=2, number=2,
type=5, type=5,
@ -66,10 +69,11 @@ _PLAYBACK = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='playback_speed', name="playback_speed",
full_name='spotify.player.proto.transfer.Playback.playback_speed', full_name="spotify.player.proto.transfer.Playback.playback_speed",
index=2, index=2,
number=3, number=3,
type=1, type=1,
@ -84,10 +88,11 @@ _PLAYBACK = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='is_paused', name="is_paused",
full_name='spotify.player.proto.transfer.Playback.is_paused', full_name="spotify.player.proto.transfer.Playback.is_paused",
index=3, index=3,
number=4, number=4,
type=8, type=8,
@ -102,10 +107,11 @@ _PLAYBACK = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='current_track', name="current_track",
full_name='spotify.player.proto.transfer.Playback.current_track', full_name="spotify.player.proto.transfer.Playback.current_track",
index=4, index=4,
number=5, number=5,
type=11, type=11,
@ -120,14 +126,15 @@ _PLAYBACK = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=71, serialized_start=71,
@ -135,18 +142,20 @@ _PLAYBACK = _descriptor.Descriptor(
) )
_PLAYBACK.fields_by_name[ _PLAYBACK.fields_by_name[
'current_track'].message_type = context__track__pb2._CONTEXTTRACK "current_track"
DESCRIPTOR.message_types_by_name['Playback'] = _PLAYBACK ].message_type = context__track__pb2._CONTEXTTRACK
DESCRIPTOR.message_types_by_name["Playback"] = _PLAYBACK
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
Playback = _reflection.GeneratedProtocolMessageType( Playback = _reflection.GeneratedProtocolMessageType(
'Playback', "Playback",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _PLAYBACK, "DESCRIPTOR": _PLAYBACK,
'__module__': 'playback_pb2' "__module__": "playback_pb2"
# @@protoc_insertion_point(class_scope:spotify.player.proto.transfer.Playback) # @@protoc_insertion_point(class_scope:spotify.player.proto.transfer.Playback)
}) },
)
_sym_db.RegisterMessage(Playback) _sym_db.RegisterMessage(Playback)
DESCRIPTOR._options = None DESCRIPTOR._options = None

File diff suppressed because one or more lines are too long

View File

@ -7,40 +7,43 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='playlist_annotate3.proto', name="playlist_annotate3.proto",
package='spotify_playlist_annotate3.proto', package="spotify_playlist_annotate3.proto",
syntax='proto2', syntax="proto2",
serialized_options=b'\n\036com.spotify.playlist_annotate3H\002', serialized_options=b"\n\036com.spotify.playlist_annotate3H\002",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x18playlist_annotate3.proto\x12 spotify_playlist_annotate3.proto\"a\n\x0fTakedownRequest\x12N\n\x12\x61\x62use_report_state\x18\x01 \x01(\x0e\x32\x32.spotify_playlist_annotate3.proto.AbuseReportState\"9\n\x0f\x41nnotateRequest\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x11\n\timage_uri\x18\x02 \x01(\t\"5\n\x11TranscodedPicture\x12\x13\n\x0btarget_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xf4\x02\n\x12PlaylistAnnotation\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x0f\n\x07picture\x18\x02 \x01(\t\x12i\n\x1a\x64\x65precated_render_features\x18\x03 \x01(\x0e\x32\x30.spotify_playlist_annotate3.proto.RenderFeatures:\x0fNORMAL_FEATURESB\x02\x18\x01\x12O\n\x12transcoded_picture\x18\x04 \x03(\x0b\x32\x33.spotify_playlist_annotate3.proto.TranscodedPicture\x12(\n\x1ais_abuse_reporting_enabled\x18\x06 \x01(\x08:\x04true\x12R\n\x12\x61\x62use_report_state\x18\x07 \x01(\x0e\x32\x32.spotify_playlist_annotate3.proto.AbuseReportState:\x02OK*<\n\x0eRenderFeatures\x12\x13\n\x0fNORMAL_FEATURES\x10\x01\x12\x15\n\x11\x45XTENDED_FEATURES\x10\x02**\n\x10\x41\x62useReportState\x12\x06\n\x02OK\x10\x00\x12\x0e\n\nTAKEN_DOWN\x10\x01\x42\"\n\x1e\x63om.spotify.playlist_annotate3H\x02' serialized_pb=b'\n\x18playlist_annotate3.proto\x12 spotify_playlist_annotate3.proto"a\n\x0fTakedownRequest\x12N\n\x12\x61\x62use_report_state\x18\x01 \x01(\x0e\x32\x32.spotify_playlist_annotate3.proto.AbuseReportState"9\n\x0f\x41nnotateRequest\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x11\n\timage_uri\x18\x02 \x01(\t"5\n\x11TranscodedPicture\x12\x13\n\x0btarget_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t"\xf4\x02\n\x12PlaylistAnnotation\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x0f\n\x07picture\x18\x02 \x01(\t\x12i\n\x1a\x64\x65precated_render_features\x18\x03 \x01(\x0e\x32\x30.spotify_playlist_annotate3.proto.RenderFeatures:\x0fNORMAL_FEATURESB\x02\x18\x01\x12O\n\x12transcoded_picture\x18\x04 \x03(\x0b\x32\x33.spotify_playlist_annotate3.proto.TranscodedPicture\x12(\n\x1ais_abuse_reporting_enabled\x18\x06 \x01(\x08:\x04true\x12R\n\x12\x61\x62use_report_state\x18\x07 \x01(\x0e\x32\x32.spotify_playlist_annotate3.proto.AbuseReportState:\x02OK*<\n\x0eRenderFeatures\x12\x13\n\x0fNORMAL_FEATURES\x10\x01\x12\x15\n\x11\x45XTENDED_FEATURES\x10\x02**\n\x10\x41\x62useReportState\x12\x06\n\x02OK\x10\x00\x12\x0e\n\nTAKEN_DOWN\x10\x01\x42"\n\x1e\x63om.spotify.playlist_annotate3H\x02',
) )
_RENDERFEATURES = _descriptor.EnumDescriptor( _RENDERFEATURES = _descriptor.EnumDescriptor(
name='RenderFeatures', name="RenderFeatures",
full_name='spotify_playlist_annotate3.proto.RenderFeatures', full_name="spotify_playlist_annotate3.proto.RenderFeatures",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
values=[ values=[
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='NORMAL_FEATURES', name="NORMAL_FEATURES",
index=0, index=0,
number=1, number=1,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='EXTENDED_FEATURES', name="EXTENDED_FEATURES",
index=1, index=1,
number=2, number=2,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
containing_type=None, containing_type=None,
serialized_options=None, serialized_options=None,
@ -51,26 +54,28 @@ _sym_db.RegisterEnumDescriptor(_RENDERFEATURES)
RenderFeatures = enum_type_wrapper.EnumTypeWrapper(_RENDERFEATURES) RenderFeatures = enum_type_wrapper.EnumTypeWrapper(_RENDERFEATURES)
_ABUSEREPORTSTATE = _descriptor.EnumDescriptor( _ABUSEREPORTSTATE = _descriptor.EnumDescriptor(
name='AbuseReportState', name="AbuseReportState",
full_name='spotify_playlist_annotate3.proto.AbuseReportState', full_name="spotify_playlist_annotate3.proto.AbuseReportState",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
values=[ values=[
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='OK', name="OK",
index=0, index=0,
number=0, number=0,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='TAKEN_DOWN', name="TAKEN_DOWN",
index=1, index=1,
number=1, number=1,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
containing_type=None, containing_type=None,
serialized_options=None, serialized_options=None,
@ -86,16 +91,16 @@ OK = 0
TAKEN_DOWN = 1 TAKEN_DOWN = 1
_TAKEDOWNREQUEST = _descriptor.Descriptor( _TAKEDOWNREQUEST = _descriptor.Descriptor(
name='TakedownRequest', name="TakedownRequest",
full_name='spotify_playlist_annotate3.proto.TakedownRequest', full_name="spotify_playlist_annotate3.proto.TakedownRequest",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='abuse_report_state', name="abuse_report_state",
full_name='spotify_playlist_annotate3.proto.TakedownRequest.abuse_report_state', full_name="spotify_playlist_annotate3.proto.TakedownRequest.abuse_report_state",
index=0, index=0,
number=1, number=1,
type=14, type=14,
@ -110,14 +115,15 @@ _TAKEDOWNREQUEST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=62, serialized_start=62,
@ -125,23 +131,23 @@ _TAKEDOWNREQUEST = _descriptor.Descriptor(
) )
_ANNOTATEREQUEST = _descriptor.Descriptor( _ANNOTATEREQUEST = _descriptor.Descriptor(
name='AnnotateRequest', name="AnnotateRequest",
full_name='spotify_playlist_annotate3.proto.AnnotateRequest', full_name="spotify_playlist_annotate3.proto.AnnotateRequest",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='description', name="description",
full_name='spotify_playlist_annotate3.proto.AnnotateRequest.description', full_name="spotify_playlist_annotate3.proto.AnnotateRequest.description",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -149,17 +155,18 @@ _ANNOTATEREQUEST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='image_uri', name="image_uri",
full_name='spotify_playlist_annotate3.proto.AnnotateRequest.image_uri', full_name="spotify_playlist_annotate3.proto.AnnotateRequest.image_uri",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -167,14 +174,15 @@ _ANNOTATEREQUEST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=161, serialized_start=161,
@ -182,23 +190,23 @@ _ANNOTATEREQUEST = _descriptor.Descriptor(
) )
_TRANSCODEDPICTURE = _descriptor.Descriptor( _TRANSCODEDPICTURE = _descriptor.Descriptor(
name='TranscodedPicture', name="TranscodedPicture",
full_name='spotify_playlist_annotate3.proto.TranscodedPicture', full_name="spotify_playlist_annotate3.proto.TranscodedPicture",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='target_name', name="target_name",
full_name='spotify_playlist_annotate3.proto.TranscodedPicture.target_name', full_name="spotify_playlist_annotate3.proto.TranscodedPicture.target_name",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -206,17 +214,18 @@ _TRANSCODEDPICTURE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='uri', name="uri",
full_name='spotify_playlist_annotate3.proto.TranscodedPicture.uri', full_name="spotify_playlist_annotate3.proto.TranscodedPicture.uri",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -224,14 +233,15 @@ _TRANSCODEDPICTURE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=220, serialized_start=220,
@ -239,23 +249,23 @@ _TRANSCODEDPICTURE = _descriptor.Descriptor(
) )
_PLAYLISTANNOTATION = _descriptor.Descriptor( _PLAYLISTANNOTATION = _descriptor.Descriptor(
name='PlaylistAnnotation', name="PlaylistAnnotation",
full_name='spotify_playlist_annotate3.proto.PlaylistAnnotation', full_name="spotify_playlist_annotate3.proto.PlaylistAnnotation",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='description', name="description",
full_name='spotify_playlist_annotate3.proto.PlaylistAnnotation.description', full_name="spotify_playlist_annotate3.proto.PlaylistAnnotation.description",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -263,17 +273,18 @@ _PLAYLISTANNOTATION = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='picture', name="picture",
full_name='spotify_playlist_annotate3.proto.PlaylistAnnotation.picture', full_name="spotify_playlist_annotate3.proto.PlaylistAnnotation.picture",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -281,10 +292,11 @@ _PLAYLISTANNOTATION = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='deprecated_render_features', name="deprecated_render_features",
full_name='spotify_playlist_annotate3.proto.PlaylistAnnotation.deprecated_render_features', full_name="spotify_playlist_annotate3.proto.PlaylistAnnotation.deprecated_render_features",
index=2, index=2,
number=3, number=3,
type=14, type=14,
@ -297,12 +309,13 @@ _PLAYLISTANNOTATION = _descriptor.Descriptor(
containing_type=None, containing_type=None,
is_extension=False, is_extension=False,
extension_scope=None, extension_scope=None,
serialized_options=b'\030\001', serialized_options=b"\030\001",
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='transcoded_picture', name="transcoded_picture",
full_name='spotify_playlist_annotate3.proto.PlaylistAnnotation.transcoded_picture', full_name="spotify_playlist_annotate3.proto.PlaylistAnnotation.transcoded_picture",
index=3, index=3,
number=4, number=4,
type=11, type=11,
@ -317,10 +330,11 @@ _PLAYLISTANNOTATION = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='is_abuse_reporting_enabled', name="is_abuse_reporting_enabled",
full_name='spotify_playlist_annotate3.proto.PlaylistAnnotation.is_abuse_reporting_enabled', full_name="spotify_playlist_annotate3.proto.PlaylistAnnotation.is_abuse_reporting_enabled",
index=4, index=4,
number=6, number=6,
type=8, type=8,
@ -335,10 +349,11 @@ _PLAYLISTANNOTATION = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='abuse_report_state', name="abuse_report_state",
full_name='spotify_playlist_annotate3.proto.PlaylistAnnotation.abuse_report_state', full_name="spotify_playlist_annotate3.proto.PlaylistAnnotation.abuse_report_state",
index=5, index=5,
number=7, number=7,
type=14, type=14,
@ -353,77 +368,81 @@ _PLAYLISTANNOTATION = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=276, serialized_start=276,
serialized_end=648, serialized_end=648,
) )
_TAKEDOWNREQUEST.fields_by_name[ _TAKEDOWNREQUEST.fields_by_name["abuse_report_state"].enum_type = _ABUSEREPORTSTATE
'abuse_report_state'].enum_type = _ABUSEREPORTSTATE
_PLAYLISTANNOTATION.fields_by_name[ _PLAYLISTANNOTATION.fields_by_name[
'deprecated_render_features'].enum_type = _RENDERFEATURES "deprecated_render_features"
].enum_type = _RENDERFEATURES
_PLAYLISTANNOTATION.fields_by_name[ _PLAYLISTANNOTATION.fields_by_name[
'transcoded_picture'].message_type = _TRANSCODEDPICTURE "transcoded_picture"
_PLAYLISTANNOTATION.fields_by_name[ ].message_type = _TRANSCODEDPICTURE
'abuse_report_state'].enum_type = _ABUSEREPORTSTATE _PLAYLISTANNOTATION.fields_by_name["abuse_report_state"].enum_type = _ABUSEREPORTSTATE
DESCRIPTOR.message_types_by_name['TakedownRequest'] = _TAKEDOWNREQUEST DESCRIPTOR.message_types_by_name["TakedownRequest"] = _TAKEDOWNREQUEST
DESCRIPTOR.message_types_by_name['AnnotateRequest'] = _ANNOTATEREQUEST DESCRIPTOR.message_types_by_name["AnnotateRequest"] = _ANNOTATEREQUEST
DESCRIPTOR.message_types_by_name['TranscodedPicture'] = _TRANSCODEDPICTURE DESCRIPTOR.message_types_by_name["TranscodedPicture"] = _TRANSCODEDPICTURE
DESCRIPTOR.message_types_by_name['PlaylistAnnotation'] = _PLAYLISTANNOTATION DESCRIPTOR.message_types_by_name["PlaylistAnnotation"] = _PLAYLISTANNOTATION
DESCRIPTOR.enum_types_by_name['RenderFeatures'] = _RENDERFEATURES DESCRIPTOR.enum_types_by_name["RenderFeatures"] = _RENDERFEATURES
DESCRIPTOR.enum_types_by_name['AbuseReportState'] = _ABUSEREPORTSTATE DESCRIPTOR.enum_types_by_name["AbuseReportState"] = _ABUSEREPORTSTATE
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
TakedownRequest = _reflection.GeneratedProtocolMessageType( TakedownRequest = _reflection.GeneratedProtocolMessageType(
'TakedownRequest', "TakedownRequest",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _TAKEDOWNREQUEST, "DESCRIPTOR": _TAKEDOWNREQUEST,
'__module__': 'playlist_annotate3_pb2' "__module__": "playlist_annotate3_pb2"
# @@protoc_insertion_point(class_scope:spotify_playlist_annotate3.proto.TakedownRequest) # @@protoc_insertion_point(class_scope:spotify_playlist_annotate3.proto.TakedownRequest)
}) },
)
_sym_db.RegisterMessage(TakedownRequest) _sym_db.RegisterMessage(TakedownRequest)
AnnotateRequest = _reflection.GeneratedProtocolMessageType( AnnotateRequest = _reflection.GeneratedProtocolMessageType(
'AnnotateRequest', "AnnotateRequest",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _ANNOTATEREQUEST, "DESCRIPTOR": _ANNOTATEREQUEST,
'__module__': 'playlist_annotate3_pb2' "__module__": "playlist_annotate3_pb2"
# @@protoc_insertion_point(class_scope:spotify_playlist_annotate3.proto.AnnotateRequest) # @@protoc_insertion_point(class_scope:spotify_playlist_annotate3.proto.AnnotateRequest)
}) },
)
_sym_db.RegisterMessage(AnnotateRequest) _sym_db.RegisterMessage(AnnotateRequest)
TranscodedPicture = _reflection.GeneratedProtocolMessageType( TranscodedPicture = _reflection.GeneratedProtocolMessageType(
'TranscodedPicture', "TranscodedPicture",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _TRANSCODEDPICTURE, "DESCRIPTOR": _TRANSCODEDPICTURE,
'__module__': 'playlist_annotate3_pb2' "__module__": "playlist_annotate3_pb2"
# @@protoc_insertion_point(class_scope:spotify_playlist_annotate3.proto.TranscodedPicture) # @@protoc_insertion_point(class_scope:spotify_playlist_annotate3.proto.TranscodedPicture)
}) },
)
_sym_db.RegisterMessage(TranscodedPicture) _sym_db.RegisterMessage(TranscodedPicture)
PlaylistAnnotation = _reflection.GeneratedProtocolMessageType( PlaylistAnnotation = _reflection.GeneratedProtocolMessageType(
'PlaylistAnnotation', "PlaylistAnnotation",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _PLAYLISTANNOTATION, "DESCRIPTOR": _PLAYLISTANNOTATION,
'__module__': 'playlist_annotate3_pb2' "__module__": "playlist_annotate3_pb2"
# @@protoc_insertion_point(class_scope:spotify_playlist_annotate3.proto.PlaylistAnnotation) # @@protoc_insertion_point(class_scope:spotify_playlist_annotate3.proto.PlaylistAnnotation)
}) },
)
_sym_db.RegisterMessage(PlaylistAnnotation) _sym_db.RegisterMessage(PlaylistAnnotation)
DESCRIPTOR._options = None DESCRIPTOR._options = None
_PLAYLISTANNOTATION.fields_by_name[ _PLAYLISTANNOTATION.fields_by_name["deprecated_render_features"]._options = None
'deprecated_render_features']._options = None
# @@protoc_insertion_point(module_scope) # @@protoc_insertion_point(module_scope)

View File

@ -7,33 +7,35 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='queue.proto', name="queue.proto",
package='spotify.player.proto.transfer', package="spotify.player.proto.transfer",
syntax='proto2', syntax="proto2",
serialized_options=b'\n\024com.spotify.transferH\002', serialized_options=b"\n\024com.spotify.transferH\002",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x0bqueue.proto\x12\x1dspotify.player.proto.transfer\x1a\x13\x63ontext_track.proto\"U\n\x05Queue\x12\x32\n\x06tracks\x18\x01 \x03(\x0b\x32\".spotify.player.proto.ContextTrack\x12\x18\n\x10is_playing_queue\x18\x02 \x01(\x08\x42\x18\n\x14\x63om.spotify.transferH\x02', serialized_pb=b'\n\x0bqueue.proto\x12\x1dspotify.player.proto.transfer\x1a\x13\x63ontext_track.proto"U\n\x05Queue\x12\x32\n\x06tracks\x18\x01 \x03(\x0b\x32".spotify.player.proto.ContextTrack\x12\x18\n\x10is_playing_queue\x18\x02 \x01(\x08\x42\x18\n\x14\x63om.spotify.transferH\x02',
dependencies=[ dependencies=[
context__track__pb2.DESCRIPTOR, context__track__pb2.DESCRIPTOR,
]) ],
)
_QUEUE = _descriptor.Descriptor( _QUEUE = _descriptor.Descriptor(
name='Queue', name="Queue",
full_name='spotify.player.proto.transfer.Queue', full_name="spotify.player.proto.transfer.Queue",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='tracks', name="tracks",
full_name='spotify.player.proto.transfer.Queue.tracks', full_name="spotify.player.proto.transfer.Queue.tracks",
index=0, index=0,
number=1, number=1,
type=11, type=11,
@ -48,10 +50,11 @@ _QUEUE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='is_playing_queue', name="is_playing_queue",
full_name='spotify.player.proto.transfer.Queue.is_playing_queue', full_name="spotify.player.proto.transfer.Queue.is_playing_queue",
index=1, index=1,
number=2, number=2,
type=8, type=8,
@ -66,33 +69,34 @@ _QUEUE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=67, serialized_start=67,
serialized_end=152, serialized_end=152,
) )
_QUEUE.fields_by_name[ _QUEUE.fields_by_name["tracks"].message_type = context__track__pb2._CONTEXTTRACK
'tracks'].message_type = context__track__pb2._CONTEXTTRACK DESCRIPTOR.message_types_by_name["Queue"] = _QUEUE
DESCRIPTOR.message_types_by_name['Queue'] = _QUEUE
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
Queue = _reflection.GeneratedProtocolMessageType( Queue = _reflection.GeneratedProtocolMessageType(
'Queue', "Queue",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _QUEUE, "DESCRIPTOR": _QUEUE,
'__module__': 'queue_pb2' "__module__": "queue_pb2"
# @@protoc_insertion_point(class_scope:spotify.player.proto.transfer.Queue) # @@protoc_insertion_point(class_scope:spotify.player.proto.transfer.Queue)
}) },
)
_sym_db.RegisterMessage(Queue) _sym_db.RegisterMessage(Queue)
DESCRIPTOR._options = None DESCRIPTOR._options = None

View File

@ -6,30 +6,31 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='restrictions.proto', name="restrictions.proto",
package='spotify.player.proto', package="spotify.player.proto",
syntax='proto2', syntax="proto2",
serialized_options=b'\n\023com.spotify.contextH\002', serialized_options=b"\n\023com.spotify.contextH\002",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x12restrictions.proto\x12\x14spotify.player.proto\"\xbb\x07\n\x0cRestrictions\x12 \n\x18\x64isallow_pausing_reasons\x18\x01 \x03(\t\x12!\n\x19\x64isallow_resuming_reasons\x18\x02 \x03(\t\x12 \n\x18\x64isallow_seeking_reasons\x18\x03 \x03(\t\x12%\n\x1d\x64isallow_peeking_prev_reasons\x18\x04 \x03(\t\x12%\n\x1d\x64isallow_peeking_next_reasons\x18\x05 \x03(\t\x12&\n\x1e\x64isallow_skipping_prev_reasons\x18\x06 \x03(\t\x12&\n\x1e\x64isallow_skipping_next_reasons\x18\x07 \x03(\t\x12\x30\n(disallow_toggling_repeat_context_reasons\x18\x08 \x03(\t\x12.\n&disallow_toggling_repeat_track_reasons\x18\t \x03(\t\x12)\n!disallow_toggling_shuffle_reasons\x18\n \x03(\t\x12\"\n\x1a\x64isallow_set_queue_reasons\x18\x0b \x03(\t\x12.\n&disallow_interrupting_playback_reasons\x18\x0c \x03(\t\x12.\n&disallow_transferring_playback_reasons\x18\r \x03(\t\x12\'\n\x1f\x64isallow_remote_control_reasons\x18\x0e \x03(\t\x12\x33\n+disallow_inserting_into_next_tracks_reasons\x18\x0f \x03(\t\x12\x36\n.disallow_inserting_into_context_tracks_reasons\x18\x10 \x03(\t\x12\x32\n*disallow_reordering_in_next_tracks_reasons\x18\x11 \x03(\t\x12\x35\n-disallow_reordering_in_context_tracks_reasons\x18\x12 \x03(\t\x12\x32\n*disallow_removing_from_next_tracks_reasons\x18\x13 \x03(\t\x12\x35\n-disallow_removing_from_context_tracks_reasons\x18\x14 \x03(\t\x12)\n!disallow_updating_context_reasons\x18\x15 \x03(\tB\x17\n\x13\x63om.spotify.contextH\x02' serialized_pb=b'\n\x12restrictions.proto\x12\x14spotify.player.proto"\xbb\x07\n\x0cRestrictions\x12 \n\x18\x64isallow_pausing_reasons\x18\x01 \x03(\t\x12!\n\x19\x64isallow_resuming_reasons\x18\x02 \x03(\t\x12 \n\x18\x64isallow_seeking_reasons\x18\x03 \x03(\t\x12%\n\x1d\x64isallow_peeking_prev_reasons\x18\x04 \x03(\t\x12%\n\x1d\x64isallow_peeking_next_reasons\x18\x05 \x03(\t\x12&\n\x1e\x64isallow_skipping_prev_reasons\x18\x06 \x03(\t\x12&\n\x1e\x64isallow_skipping_next_reasons\x18\x07 \x03(\t\x12\x30\n(disallow_toggling_repeat_context_reasons\x18\x08 \x03(\t\x12.\n&disallow_toggling_repeat_track_reasons\x18\t \x03(\t\x12)\n!disallow_toggling_shuffle_reasons\x18\n \x03(\t\x12"\n\x1a\x64isallow_set_queue_reasons\x18\x0b \x03(\t\x12.\n&disallow_interrupting_playback_reasons\x18\x0c \x03(\t\x12.\n&disallow_transferring_playback_reasons\x18\r \x03(\t\x12\'\n\x1f\x64isallow_remote_control_reasons\x18\x0e \x03(\t\x12\x33\n+disallow_inserting_into_next_tracks_reasons\x18\x0f \x03(\t\x12\x36\n.disallow_inserting_into_context_tracks_reasons\x18\x10 \x03(\t\x12\x32\n*disallow_reordering_in_next_tracks_reasons\x18\x11 \x03(\t\x12\x35\n-disallow_reordering_in_context_tracks_reasons\x18\x12 \x03(\t\x12\x32\n*disallow_removing_from_next_tracks_reasons\x18\x13 \x03(\t\x12\x35\n-disallow_removing_from_context_tracks_reasons\x18\x14 \x03(\t\x12)\n!disallow_updating_context_reasons\x18\x15 \x03(\tB\x17\n\x13\x63om.spotify.contextH\x02',
) )
_RESTRICTIONS = _descriptor.Descriptor( _RESTRICTIONS = _descriptor.Descriptor(
name='Restrictions', name="Restrictions",
full_name='spotify.player.proto.Restrictions', full_name="spotify.player.proto.Restrictions",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_pausing_reasons', name="disallow_pausing_reasons",
full_name='spotify.player.proto.Restrictions.disallow_pausing_reasons', full_name="spotify.player.proto.Restrictions.disallow_pausing_reasons",
index=0, index=0,
number=1, number=1,
type=9, type=9,
@ -44,10 +45,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_resuming_reasons', name="disallow_resuming_reasons",
full_name='spotify.player.proto.Restrictions.disallow_resuming_reasons', full_name="spotify.player.proto.Restrictions.disallow_resuming_reasons",
index=1, index=1,
number=2, number=2,
type=9, type=9,
@ -62,10 +64,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_seeking_reasons', name="disallow_seeking_reasons",
full_name='spotify.player.proto.Restrictions.disallow_seeking_reasons', full_name="spotify.player.proto.Restrictions.disallow_seeking_reasons",
index=2, index=2,
number=3, number=3,
type=9, type=9,
@ -80,10 +83,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_peeking_prev_reasons', name="disallow_peeking_prev_reasons",
full_name='spotify.player.proto.Restrictions.disallow_peeking_prev_reasons', full_name="spotify.player.proto.Restrictions.disallow_peeking_prev_reasons",
index=3, index=3,
number=4, number=4,
type=9, type=9,
@ -98,10 +102,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_peeking_next_reasons', name="disallow_peeking_next_reasons",
full_name='spotify.player.proto.Restrictions.disallow_peeking_next_reasons', full_name="spotify.player.proto.Restrictions.disallow_peeking_next_reasons",
index=4, index=4,
number=5, number=5,
type=9, type=9,
@ -116,10 +121,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_skipping_prev_reasons', name="disallow_skipping_prev_reasons",
full_name='spotify.player.proto.Restrictions.disallow_skipping_prev_reasons', full_name="spotify.player.proto.Restrictions.disallow_skipping_prev_reasons",
index=5, index=5,
number=6, number=6,
type=9, type=9,
@ -134,10 +140,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_skipping_next_reasons', name="disallow_skipping_next_reasons",
full_name='spotify.player.proto.Restrictions.disallow_skipping_next_reasons', full_name="spotify.player.proto.Restrictions.disallow_skipping_next_reasons",
index=6, index=6,
number=7, number=7,
type=9, type=9,
@ -152,10 +159,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_toggling_repeat_context_reasons', name="disallow_toggling_repeat_context_reasons",
full_name='spotify.player.proto.Restrictions.disallow_toggling_repeat_context_reasons', full_name="spotify.player.proto.Restrictions.disallow_toggling_repeat_context_reasons",
index=7, index=7,
number=8, number=8,
type=9, type=9,
@ -170,10 +178,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_toggling_repeat_track_reasons', name="disallow_toggling_repeat_track_reasons",
full_name='spotify.player.proto.Restrictions.disallow_toggling_repeat_track_reasons', full_name="spotify.player.proto.Restrictions.disallow_toggling_repeat_track_reasons",
index=8, index=8,
number=9, number=9,
type=9, type=9,
@ -188,10 +197,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_toggling_shuffle_reasons', name="disallow_toggling_shuffle_reasons",
full_name='spotify.player.proto.Restrictions.disallow_toggling_shuffle_reasons', full_name="spotify.player.proto.Restrictions.disallow_toggling_shuffle_reasons",
index=9, index=9,
number=10, number=10,
type=9, type=9,
@ -206,10 +216,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_set_queue_reasons', name="disallow_set_queue_reasons",
full_name='spotify.player.proto.Restrictions.disallow_set_queue_reasons', full_name="spotify.player.proto.Restrictions.disallow_set_queue_reasons",
index=10, index=10,
number=11, number=11,
type=9, type=9,
@ -224,10 +235,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_interrupting_playback_reasons', name="disallow_interrupting_playback_reasons",
full_name='spotify.player.proto.Restrictions.disallow_interrupting_playback_reasons', full_name="spotify.player.proto.Restrictions.disallow_interrupting_playback_reasons",
index=11, index=11,
number=12, number=12,
type=9, type=9,
@ -242,10 +254,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_transferring_playback_reasons', name="disallow_transferring_playback_reasons",
full_name='spotify.player.proto.Restrictions.disallow_transferring_playback_reasons', full_name="spotify.player.proto.Restrictions.disallow_transferring_playback_reasons",
index=12, index=12,
number=13, number=13,
type=9, type=9,
@ -260,10 +273,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_remote_control_reasons', name="disallow_remote_control_reasons",
full_name='spotify.player.proto.Restrictions.disallow_remote_control_reasons', full_name="spotify.player.proto.Restrictions.disallow_remote_control_reasons",
index=13, index=13,
number=14, number=14,
type=9, type=9,
@ -278,10 +292,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_inserting_into_next_tracks_reasons', name="disallow_inserting_into_next_tracks_reasons",
full_name='spotify.player.proto.Restrictions.disallow_inserting_into_next_tracks_reasons', full_name="spotify.player.proto.Restrictions.disallow_inserting_into_next_tracks_reasons",
index=14, index=14,
number=15, number=15,
type=9, type=9,
@ -296,10 +311,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_inserting_into_context_tracks_reasons', name="disallow_inserting_into_context_tracks_reasons",
full_name='spotify.player.proto.Restrictions.disallow_inserting_into_context_tracks_reasons', full_name="spotify.player.proto.Restrictions.disallow_inserting_into_context_tracks_reasons",
index=15, index=15,
number=16, number=16,
type=9, type=9,
@ -314,10 +330,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_reordering_in_next_tracks_reasons', name="disallow_reordering_in_next_tracks_reasons",
full_name='spotify.player.proto.Restrictions.disallow_reordering_in_next_tracks_reasons', full_name="spotify.player.proto.Restrictions.disallow_reordering_in_next_tracks_reasons",
index=16, index=16,
number=17, number=17,
type=9, type=9,
@ -332,10 +349,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_reordering_in_context_tracks_reasons', name="disallow_reordering_in_context_tracks_reasons",
full_name='spotify.player.proto.Restrictions.disallow_reordering_in_context_tracks_reasons', full_name="spotify.player.proto.Restrictions.disallow_reordering_in_context_tracks_reasons",
index=17, index=17,
number=18, number=18,
type=9, type=9,
@ -350,10 +368,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_removing_from_next_tracks_reasons', name="disallow_removing_from_next_tracks_reasons",
full_name='spotify.player.proto.Restrictions.disallow_removing_from_next_tracks_reasons', full_name="spotify.player.proto.Restrictions.disallow_removing_from_next_tracks_reasons",
index=18, index=18,
number=19, number=19,
type=9, type=9,
@ -368,10 +387,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_removing_from_context_tracks_reasons', name="disallow_removing_from_context_tracks_reasons",
full_name='spotify.player.proto.Restrictions.disallow_removing_from_context_tracks_reasons', full_name="spotify.player.proto.Restrictions.disallow_removing_from_context_tracks_reasons",
index=19, index=19,
number=20, number=20,
type=9, type=9,
@ -386,10 +406,11 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='disallow_updating_context_reasons', name="disallow_updating_context_reasons",
full_name='spotify.player.proto.Restrictions.disallow_updating_context_reasons', full_name="spotify.player.proto.Restrictions.disallow_updating_context_reasons",
index=20, index=20,
number=21, number=21,
type=9, type=9,
@ -404,31 +425,33 @@ _RESTRICTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=45, serialized_start=45,
serialized_end=1000, serialized_end=1000,
) )
DESCRIPTOR.message_types_by_name['Restrictions'] = _RESTRICTIONS DESCRIPTOR.message_types_by_name["Restrictions"] = _RESTRICTIONS
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
Restrictions = _reflection.GeneratedProtocolMessageType( Restrictions = _reflection.GeneratedProtocolMessageType(
'Restrictions', "Restrictions",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _RESTRICTIONS, "DESCRIPTOR": _RESTRICTIONS,
'__module__': 'restrictions_pb2' "__module__": "restrictions_pb2"
# @@protoc_insertion_point(class_scope:spotify.player.proto.Restrictions) # @@protoc_insertion_point(class_scope:spotify.player.proto.Restrictions)
}) },
)
_sym_db.RegisterMessage(Restrictions) _sym_db.RegisterMessage(Restrictions)
DESCRIPTOR._options = None DESCRIPTOR._options = None

View File

@ -9,35 +9,37 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='session.proto', name="session.proto",
package='spotify.player.proto.transfer', package="spotify.player.proto.transfer",
syntax='proto2', syntax="proto2",
serialized_options=b'\n\024com.spotify.transferH\002', serialized_options=b"\n\024com.spotify.transferH\002",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\rsession.proto\x12\x1dspotify.player.proto.transfer\x1a\rcontext.proto\x1a\x1c\x63ontext_player_options.proto\x1a\x11play_origin.proto\"\xd3\x01\n\x07Session\x12\x35\n\x0bplay_origin\x18\x01 \x01(\x0b\x32 .spotify.player.proto.PlayOrigin\x12.\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x1d.spotify.player.proto.Context\x12\x13\n\x0b\x63urrent_uid\x18\x03 \x01(\t\x12L\n\x10option_overrides\x18\x04 \x01(\x0b\x32\x32.spotify.player.proto.ContextPlayerOptionOverridesB\x18\n\x14\x63om.spotify.transferH\x02', serialized_pb=b'\n\rsession.proto\x12\x1dspotify.player.proto.transfer\x1a\rcontext.proto\x1a\x1c\x63ontext_player_options.proto\x1a\x11play_origin.proto"\xd3\x01\n\x07Session\x12\x35\n\x0bplay_origin\x18\x01 \x01(\x0b\x32 .spotify.player.proto.PlayOrigin\x12.\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x1d.spotify.player.proto.Context\x12\x13\n\x0b\x63urrent_uid\x18\x03 \x01(\t\x12L\n\x10option_overrides\x18\x04 \x01(\x0b\x32\x32.spotify.player.proto.ContextPlayerOptionOverridesB\x18\n\x14\x63om.spotify.transferH\x02',
dependencies=[ dependencies=[
context__pb2.DESCRIPTOR, context__pb2.DESCRIPTOR,
context__player__options__pb2.DESCRIPTOR, context__player__options__pb2.DESCRIPTOR,
play__origin__pb2.DESCRIPTOR, play__origin__pb2.DESCRIPTOR,
]) ],
)
_SESSION = _descriptor.Descriptor( _SESSION = _descriptor.Descriptor(
name='Session', name="Session",
full_name='spotify.player.proto.transfer.Session', full_name="spotify.player.proto.transfer.Session",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='play_origin', name="play_origin",
full_name='spotify.player.proto.transfer.Session.play_origin', full_name="spotify.player.proto.transfer.Session.play_origin",
index=0, index=0,
number=1, number=1,
type=11, type=11,
@ -52,10 +54,11 @@ _SESSION = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='context', name="context",
full_name='spotify.player.proto.transfer.Session.context', full_name="spotify.player.proto.transfer.Session.context",
index=1, index=1,
number=2, number=2,
type=11, type=11,
@ -70,17 +73,18 @@ _SESSION = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='current_uid', name="current_uid",
full_name='spotify.player.proto.transfer.Session.current_uid', full_name="spotify.player.proto.transfer.Session.current_uid",
index=2, index=2,
number=3, number=3,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -88,10 +92,11 @@ _SESSION = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='option_overrides', name="option_overrides",
full_name='spotify.player.proto.transfer.Session.option_overrides', full_name="spotify.player.proto.transfer.Session.option_overrides",
index=3, index=3,
number=4, number=4,
type=11, type=11,
@ -106,36 +111,38 @@ _SESSION = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=113, serialized_start=113,
serialized_end=324, serialized_end=324,
) )
_SESSION.fields_by_name["play_origin"].message_type = play__origin__pb2._PLAYORIGIN
_SESSION.fields_by_name["context"].message_type = context__pb2._CONTEXT
_SESSION.fields_by_name[ _SESSION.fields_by_name[
'play_origin'].message_type = play__origin__pb2._PLAYORIGIN "option_overrides"
_SESSION.fields_by_name['context'].message_type = context__pb2._CONTEXT ].message_type = context__player__options__pb2._CONTEXTPLAYEROPTIONOVERRIDES
_SESSION.fields_by_name[ DESCRIPTOR.message_types_by_name["Session"] = _SESSION
'option_overrides'].message_type = context__player__options__pb2._CONTEXTPLAYEROPTIONOVERRIDES
DESCRIPTOR.message_types_by_name['Session'] = _SESSION
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
Session = _reflection.GeneratedProtocolMessageType( Session = _reflection.GeneratedProtocolMessageType(
'Session', "Session",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _SESSION, "DESCRIPTOR": _SESSION,
'__module__': 'session_pb2' "__module__": "session_pb2"
# @@protoc_insertion_point(class_scope:spotify.player.proto.transfer.Session) # @@protoc_insertion_point(class_scope:spotify.player.proto.transfer.Session)
}) },
)
_sym_db.RegisterMessage(Session) _sym_db.RegisterMessage(Session)
DESCRIPTOR._options = None DESCRIPTOR._options = None

View File

@ -10,36 +10,38 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='transfer_state.proto', name="transfer_state.proto",
package='spotify.player.proto.transfer', package="spotify.player.proto.transfer",
syntax='proto2', syntax="proto2",
serialized_options=b'\n\024com.spotify.transferH\002', serialized_options=b"\n\024com.spotify.transferH\002",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x14transfer_state.proto\x12\x1dspotify.player.proto.transfer\x1a\x1c\x63ontext_player_options.proto\x1a\x0eplayback.proto\x1a\rsession.proto\x1a\x0bqueue.proto\"\x99\x02\n\rTransferState\x12;\n\x07options\x18\x01 \x01(\x0b\x32*.spotify.player.proto.ContextPlayerOptions\x12\x39\n\x08playback\x18\x02 \x01(\x0b\x32\'.spotify.player.proto.transfer.Playback\x12?\n\x0f\x63urrent_session\x18\x03 \x01(\x0b\x32&.spotify.player.proto.transfer.Session\x12\x33\n\x05queue\x18\x04 \x01(\x0b\x32$.spotify.player.proto.transfer.Queue\x12\x1a\n\x12\x63reation_timestamp\x18\x05 \x01(\x03\x42\x18\n\x14\x63om.spotify.transferH\x02', serialized_pb=b"\n\x14transfer_state.proto\x12\x1dspotify.player.proto.transfer\x1a\x1c\x63ontext_player_options.proto\x1a\x0eplayback.proto\x1a\rsession.proto\x1a\x0bqueue.proto\"\x99\x02\n\rTransferState\x12;\n\x07options\x18\x01 \x01(\x0b\x32*.spotify.player.proto.ContextPlayerOptions\x12\x39\n\x08playback\x18\x02 \x01(\x0b\x32'.spotify.player.proto.transfer.Playback\x12?\n\x0f\x63urrent_session\x18\x03 \x01(\x0b\x32&.spotify.player.proto.transfer.Session\x12\x33\n\x05queue\x18\x04 \x01(\x0b\x32$.spotify.player.proto.transfer.Queue\x12\x1a\n\x12\x63reation_timestamp\x18\x05 \x01(\x03\x42\x18\n\x14\x63om.spotify.transferH\x02",
dependencies=[ dependencies=[
context__player__options__pb2.DESCRIPTOR, context__player__options__pb2.DESCRIPTOR,
playback__pb2.DESCRIPTOR, playback__pb2.DESCRIPTOR,
session__pb2.DESCRIPTOR, session__pb2.DESCRIPTOR,
queue__pb2.DESCRIPTOR, queue__pb2.DESCRIPTOR,
]) ],
)
_TRANSFERSTATE = _descriptor.Descriptor( _TRANSFERSTATE = _descriptor.Descriptor(
name='TransferState', name="TransferState",
full_name='spotify.player.proto.transfer.TransferState', full_name="spotify.player.proto.transfer.TransferState",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='options', name="options",
full_name='spotify.player.proto.transfer.TransferState.options', full_name="spotify.player.proto.transfer.TransferState.options",
index=0, index=0,
number=1, number=1,
type=11, type=11,
@ -54,10 +56,11 @@ _TRANSFERSTATE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='playback', name="playback",
full_name='spotify.player.proto.transfer.TransferState.playback', full_name="spotify.player.proto.transfer.TransferState.playback",
index=1, index=1,
number=2, number=2,
type=11, type=11,
@ -72,10 +75,11 @@ _TRANSFERSTATE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='current_session', name="current_session",
full_name='spotify.player.proto.transfer.TransferState.current_session', full_name="spotify.player.proto.transfer.TransferState.current_session",
index=2, index=2,
number=3, number=3,
type=11, type=11,
@ -90,10 +94,11 @@ _TRANSFERSTATE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='queue', name="queue",
full_name='spotify.player.proto.transfer.TransferState.queue', full_name="spotify.player.proto.transfer.TransferState.queue",
index=3, index=3,
number=4, number=4,
type=11, type=11,
@ -108,10 +113,11 @@ _TRANSFERSTATE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='creation_timestamp', name="creation_timestamp",
full_name='spotify.player.proto.transfer.TransferState.creation_timestamp', full_name="spotify.player.proto.transfer.TransferState.creation_timestamp",
index=4, index=4,
number=5, number=5,
type=3, type=3,
@ -126,14 +132,15 @@ _TRANSFERSTATE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto2', syntax="proto2",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=130, serialized_start=130,
@ -141,23 +148,23 @@ _TRANSFERSTATE = _descriptor.Descriptor(
) )
_TRANSFERSTATE.fields_by_name[ _TRANSFERSTATE.fields_by_name[
'options'].message_type = context__player__options__pb2._CONTEXTPLAYEROPTIONS "options"
_TRANSFERSTATE.fields_by_name[ ].message_type = context__player__options__pb2._CONTEXTPLAYEROPTIONS
'playback'].message_type = playback__pb2._PLAYBACK _TRANSFERSTATE.fields_by_name["playback"].message_type = playback__pb2._PLAYBACK
_TRANSFERSTATE.fields_by_name[ _TRANSFERSTATE.fields_by_name["current_session"].message_type = session__pb2._SESSION
'current_session'].message_type = session__pb2._SESSION _TRANSFERSTATE.fields_by_name["queue"].message_type = queue__pb2._QUEUE
_TRANSFERSTATE.fields_by_name['queue'].message_type = queue__pb2._QUEUE DESCRIPTOR.message_types_by_name["TransferState"] = _TRANSFERSTATE
DESCRIPTOR.message_types_by_name['TransferState'] = _TRANSFERSTATE
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
TransferState = _reflection.GeneratedProtocolMessageType( TransferState = _reflection.GeneratedProtocolMessageType(
'TransferState', "TransferState",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _TRANSFERSTATE, "DESCRIPTOR": _TRANSFERSTATE,
'__module__': 'transfer_state_pb2' "__module__": "transfer_state_pb2"
# @@protoc_insertion_point(class_scope:spotify.player.proto.transfer.TransferState) # @@protoc_insertion_point(class_scope:spotify.player.proto.transfer.TransferState)
}) },
)
_sym_db.RegisterMessage(TransferState) _sym_db.RegisterMessage(TransferState)
DESCRIPTOR._options = None DESCRIPTOR._options = None

View File

@ -6,37 +6,38 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='spotify/login5/v3/client_info.proto', name="spotify/login5/v3/client_info.proto",
package='spotify.login5.v3', package="spotify.login5.v3",
syntax='proto3', syntax="proto3",
serialized_options=b'\n\024com.spotify.login5v3', serialized_options=b"\n\024com.spotify.login5v3",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n#spotify/login5/v3/client_info.proto\x12\x11spotify.login5.v3\"2\n\nClientInfo\x12\x11\n\tclient_id\x18\x01 \x01(\t\x12\x11\n\tdevice_id\x18\x02 \x01(\tB\x16\n\x14\x63om.spotify.login5v3b\x06proto3' serialized_pb=b'\n#spotify/login5/v3/client_info.proto\x12\x11spotify.login5.v3"2\n\nClientInfo\x12\x11\n\tclient_id\x18\x01 \x01(\t\x12\x11\n\tdevice_id\x18\x02 \x01(\tB\x16\n\x14\x63om.spotify.login5v3b\x06proto3',
) )
_CLIENTINFO = _descriptor.Descriptor( _CLIENTINFO = _descriptor.Descriptor(
name='ClientInfo', name="ClientInfo",
full_name='spotify.login5.v3.ClientInfo', full_name="spotify.login5.v3.ClientInfo",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='client_id', name="client_id",
full_name='spotify.login5.v3.ClientInfo.client_id', full_name="spotify.login5.v3.ClientInfo.client_id",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -44,17 +45,18 @@ _CLIENTINFO = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='device_id', name="device_id",
full_name='spotify.login5.v3.ClientInfo.device_id', full_name="spotify.login5.v3.ClientInfo.device_id",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -62,31 +64,33 @@ _CLIENTINFO = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=58, serialized_start=58,
serialized_end=108, serialized_end=108,
) )
DESCRIPTOR.message_types_by_name['ClientInfo'] = _CLIENTINFO DESCRIPTOR.message_types_by_name["ClientInfo"] = _CLIENTINFO
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
ClientInfo = _reflection.GeneratedProtocolMessageType( ClientInfo = _reflection.GeneratedProtocolMessageType(
'ClientInfo', "ClientInfo",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _CLIENTINFO, "DESCRIPTOR": _CLIENTINFO,
'__module__': 'spotify.login5.v3.client_info_pb2' "__module__": "spotify.login5.v3.client_info_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.ClientInfo) # @@protoc_insertion_point(class_scope:spotify.login5.v3.ClientInfo)
}) },
)
_sym_db.RegisterMessage(ClientInfo) _sym_db.RegisterMessage(ClientInfo)
DESCRIPTOR._options = None DESCRIPTOR._options = None

View File

@ -2,110 +2,131 @@
# Generated by the protocol buffer compiler. DO NOT EDIT! # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: spotify/login5/v3/login5.proto # source: spotify/login5/v3/login5.proto
"""Generated protocol buffer code.""" """Generated protocol buffer code."""
from spotify.login5.v3.identifiers import identifiers_pb2 as spotify_dot_login5_dot_v3_dot_identifiers_dot_identifiers__pb2 from spotify.login5.v3.identifiers import (
from spotify.login5.v3.credentials import credentials_pb2 as spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2 identifiers_pb2 as spotify_dot_login5_dot_v3_dot_identifiers_dot_identifiers__pb2,
from spotify.login5.v3.challenges import hashcash_pb2 as spotify_dot_login5_dot_v3_dot_challenges_dot_hashcash__pb2 )
from spotify.login5.v3.challenges import code_pb2 as spotify_dot_login5_dot_v3_dot_challenges_dot_code__pb2 from spotify.login5.v3.credentials import (
from spotify.login5.v3 import user_info_pb2 as spotify_dot_login5_dot_v3_dot_user__info__pb2 credentials_pb2 as spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2,
from spotify.login5.v3 import client_info_pb2 as spotify_dot_login5_dot_v3_dot_client__info__pb2 )
from spotify.login5.v3.challenges import (
hashcash_pb2 as spotify_dot_login5_dot_v3_dot_challenges_dot_hashcash__pb2,
)
from spotify.login5.v3.challenges import (
code_pb2 as spotify_dot_login5_dot_v3_dot_challenges_dot_code__pb2,
)
from spotify.login5.v3 import (
user_info_pb2 as spotify_dot_login5_dot_v3_dot_user__info__pb2,
)
from spotify.login5.v3 import (
client_info_pb2 as spotify_dot_login5_dot_v3_dot_client__info__pb2,
)
from google.protobuf.internal import enum_type_wrapper from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='spotify/login5/v3/login5.proto', name="spotify/login5/v3/login5.proto",
package='spotify.login5.v3', package="spotify.login5.v3",
syntax='proto3', syntax="proto3",
serialized_options=b'\n\024com.spotify.login5v3', serialized_options=b"\n\024com.spotify.login5v3",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x1espotify/login5/v3/login5.proto\x12\x11spotify.login5.v3\x1a#spotify/login5/v3/client_info.proto\x1a!spotify/login5/v3/user_info.proto\x1a\'spotify/login5/v3/challenges/code.proto\x1a+spotify/login5/v3/challenges/hashcash.proto\x1a/spotify/login5/v3/credentials/credentials.proto\x1a/spotify/login5/v3/identifiers/identifiers.proto\">\n\nChallenges\x12\x30\n\nchallenges\x18\x01 \x03(\x0b\x32\x1c.spotify.login5.v3.Challenge\"\x89\x01\n\tChallenge\x12\x41\n\x08hashcash\x18\x01 \x01(\x0b\x32/.spotify.login5.v3.challenges.HashcashChallenge\x12\x39\n\x04\x63ode\x18\x02 \x01(\x0b\x32+.spotify.login5.v3.challenges.CodeChallenge\"M\n\x12\x43hallengeSolutions\x12\x37\n\tsolutions\x18\x01 \x03(\x0b\x32$.spotify.login5.v3.ChallengeSolution\"\x8f\x01\n\x11\x43hallengeSolution\x12@\n\x08hashcash\x18\x01 \x01(\x0b\x32..spotify.login5.v3.challenges.HashcashSolution\x12\x38\n\x04\x63ode\x18\x02 \x01(\x0b\x32*.spotify.login5.v3.challenges.CodeSolution\"\xad\x05\n\x0cLoginRequest\x12\x32\n\x0b\x63lient_info\x18\x01 \x01(\x0b\x32\x1d.spotify.login5.v3.ClientInfo\x12\x15\n\rlogin_context\x18\x02 \x01(\x0c\x12\x42\n\x13\x63hallenge_solutions\x18\x03 \x01(\x0b\x32%.spotify.login5.v3.ChallengeSolutions\x12J\n\x11stored_credential\x18\x64 \x01(\x0b\x32/.spotify.login5.v3.credentials.StoredCredential\x12\x39\n\x08password\x18\x65 \x01(\x0b\x32\'.spotify.login5.v3.credentials.Password\x12Q\n\x15\x66\x61\x63\x65\x62ook_access_token\x18\x66 \x01(\x0b\x32\x32.spotify.login5.v3.credentials.FacebookAccessToken\x12@\n\x0cphone_number\x18g \x01(\x0b\x32*.spotify.login5.v3.identifiers.PhoneNumber\x12\x43\n\x0eone_time_token\x18h \x01(\x0b\x32+.spotify.login5.v3.credentials.OneTimeToken\x12U\n\x17parent_child_credential\x18i \x01(\x0b\x32\x34.spotify.login5.v3.credentials.ParentChildCredential\x12V\n\x18\x61pple_sign_in_credential\x18j \x01(\x0b\x32\x34.spotify.login5.v3.credentials.AppleSignInCredential\"m\n\x07LoginOk\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x02 \x01(\t\x12\x19\n\x11stored_credential\x18\x03 \x01(\x0c\x12\x1f\n\x17\x61\x63\x63\x65ss_token_expires_in\x18\x04 \x01(\x05\"\xf8\x02\n\rLoginResponse\x12&\n\x02ok\x18\x01 \x01(\x0b\x32\x1a.spotify.login5.v3.LoginOk\x12,\n\x05\x65rror\x18\x02 \x01(\x0e\x32\x1d.spotify.login5.v3.LoginError\x12\x31\n\nchallenges\x18\x03 \x01(\x0b\x32\x1d.spotify.login5.v3.Challenges\x12;\n\x08warnings\x18\x04 \x03(\x0e\x32).spotify.login5.v3.LoginResponse.Warnings\x12\x15\n\rlogin_context\x18\x05 \x01(\x0c\x12\x18\n\x10identifier_token\x18\x06 \x01(\t\x12.\n\tuser_info\x18\x07 \x01(\x0b\x32\x1b.spotify.login5.v3.UserInfo\"@\n\x08Warnings\x12\x13\n\x0fUNKNOWN_WARNING\x10\x00\x12\x1f\n\x1b\x44\x45PRECATED_PROTOCOL_VERSION\x10\x01*\xd3\x01\n\nLoginError\x12\x11\n\rUNKNOWN_ERROR\x10\x00\x12\x17\n\x13INVALID_CREDENTIALS\x10\x01\x12\x0f\n\x0b\x42\x41\x44_REQUEST\x10\x02\x12\x1e\n\x1aUNSUPPORTED_LOGIN_PROTOCOL\x10\x03\x12\x0b\n\x07TIMEOUT\x10\x04\x12\x16\n\x12UNKNOWN_IDENTIFIER\x10\x05\x12\x15\n\x11TOO_MANY_ATTEMPTS\x10\x06\x12\x17\n\x13INVALID_PHONENUMBER\x10\x07\x12\x13\n\x0fTRY_AGAIN_LATER\x10\x08\x42\x16\n\x14\x63om.spotify.login5v3b\x06proto3', serialized_pb=b'\n\x1espotify/login5/v3/login5.proto\x12\x11spotify.login5.v3\x1a#spotify/login5/v3/client_info.proto\x1a!spotify/login5/v3/user_info.proto\x1a\'spotify/login5/v3/challenges/code.proto\x1a+spotify/login5/v3/challenges/hashcash.proto\x1a/spotify/login5/v3/credentials/credentials.proto\x1a/spotify/login5/v3/identifiers/identifiers.proto">\n\nChallenges\x12\x30\n\nchallenges\x18\x01 \x03(\x0b\x32\x1c.spotify.login5.v3.Challenge"\x89\x01\n\tChallenge\x12\x41\n\x08hashcash\x18\x01 \x01(\x0b\x32/.spotify.login5.v3.challenges.HashcashChallenge\x12\x39\n\x04\x63ode\x18\x02 \x01(\x0b\x32+.spotify.login5.v3.challenges.CodeChallenge"M\n\x12\x43hallengeSolutions\x12\x37\n\tsolutions\x18\x01 \x03(\x0b\x32$.spotify.login5.v3.ChallengeSolution"\x8f\x01\n\x11\x43hallengeSolution\x12@\n\x08hashcash\x18\x01 \x01(\x0b\x32..spotify.login5.v3.challenges.HashcashSolution\x12\x38\n\x04\x63ode\x18\x02 \x01(\x0b\x32*.spotify.login5.v3.challenges.CodeSolution"\xad\x05\n\x0cLoginRequest\x12\x32\n\x0b\x63lient_info\x18\x01 \x01(\x0b\x32\x1d.spotify.login5.v3.ClientInfo\x12\x15\n\rlogin_context\x18\x02 \x01(\x0c\x12\x42\n\x13\x63hallenge_solutions\x18\x03 \x01(\x0b\x32%.spotify.login5.v3.ChallengeSolutions\x12J\n\x11stored_credential\x18\x64 \x01(\x0b\x32/.spotify.login5.v3.credentials.StoredCredential\x12\x39\n\x08password\x18\x65 \x01(\x0b\x32\'.spotify.login5.v3.credentials.Password\x12Q\n\x15\x66\x61\x63\x65\x62ook_access_token\x18\x66 \x01(\x0b\x32\x32.spotify.login5.v3.credentials.FacebookAccessToken\x12@\n\x0cphone_number\x18g \x01(\x0b\x32*.spotify.login5.v3.identifiers.PhoneNumber\x12\x43\n\x0eone_time_token\x18h \x01(\x0b\x32+.spotify.login5.v3.credentials.OneTimeToken\x12U\n\x17parent_child_credential\x18i \x01(\x0b\x32\x34.spotify.login5.v3.credentials.ParentChildCredential\x12V\n\x18\x61pple_sign_in_credential\x18j \x01(\x0b\x32\x34.spotify.login5.v3.credentials.AppleSignInCredential"m\n\x07LoginOk\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x02 \x01(\t\x12\x19\n\x11stored_credential\x18\x03 \x01(\x0c\x12\x1f\n\x17\x61\x63\x63\x65ss_token_expires_in\x18\x04 \x01(\x05"\xf8\x02\n\rLoginResponse\x12&\n\x02ok\x18\x01 \x01(\x0b\x32\x1a.spotify.login5.v3.LoginOk\x12,\n\x05\x65rror\x18\x02 \x01(\x0e\x32\x1d.spotify.login5.v3.LoginError\x12\x31\n\nchallenges\x18\x03 \x01(\x0b\x32\x1d.spotify.login5.v3.Challenges\x12;\n\x08warnings\x18\x04 \x03(\x0e\x32).spotify.login5.v3.LoginResponse.Warnings\x12\x15\n\rlogin_context\x18\x05 \x01(\x0c\x12\x18\n\x10identifier_token\x18\x06 \x01(\t\x12.\n\tuser_info\x18\x07 \x01(\x0b\x32\x1b.spotify.login5.v3.UserInfo"@\n\x08Warnings\x12\x13\n\x0fUNKNOWN_WARNING\x10\x00\x12\x1f\n\x1b\x44\x45PRECATED_PROTOCOL_VERSION\x10\x01*\xd3\x01\n\nLoginError\x12\x11\n\rUNKNOWN_ERROR\x10\x00\x12\x17\n\x13INVALID_CREDENTIALS\x10\x01\x12\x0f\n\x0b\x42\x41\x44_REQUEST\x10\x02\x12\x1e\n\x1aUNSUPPORTED_LOGIN_PROTOCOL\x10\x03\x12\x0b\n\x07TIMEOUT\x10\x04\x12\x16\n\x12UNKNOWN_IDENTIFIER\x10\x05\x12\x15\n\x11TOO_MANY_ATTEMPTS\x10\x06\x12\x17\n\x13INVALID_PHONENUMBER\x10\x07\x12\x13\n\x0fTRY_AGAIN_LATER\x10\x08\x42\x16\n\x14\x63om.spotify.login5v3b\x06proto3',
dependencies=[ dependencies=[
spotify_dot_login5_dot_v3_dot_client__info__pb2.DESCRIPTOR, spotify_dot_login5_dot_v3_dot_client__info__pb2.DESCRIPTOR,
spotify_dot_login5_dot_v3_dot_user__info__pb2.DESCRIPTOR, spotify_dot_login5_dot_v3_dot_user__info__pb2.DESCRIPTOR,
spotify_dot_login5_dot_v3_dot_challenges_dot_code__pb2.DESCRIPTOR, spotify_dot_login5_dot_v3_dot_challenges_dot_code__pb2.DESCRIPTOR,
spotify_dot_login5_dot_v3_dot_challenges_dot_hashcash__pb2.DESCRIPTOR, spotify_dot_login5_dot_v3_dot_challenges_dot_hashcash__pb2.DESCRIPTOR,
spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2. spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2.DESCRIPTOR,
DESCRIPTOR, spotify_dot_login5_dot_v3_dot_identifiers_dot_identifiers__pb2.DESCRIPTOR,
spotify_dot_login5_dot_v3_dot_identifiers_dot_identifiers__pb2. ],
DESCRIPTOR, )
])
_LOGINERROR = _descriptor.EnumDescriptor( _LOGINERROR = _descriptor.EnumDescriptor(
name='LoginError', name="LoginError",
full_name='spotify.login5.v3.LoginError', full_name="spotify.login5.v3.LoginError",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
values=[ values=[
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='UNKNOWN_ERROR', name="UNKNOWN_ERROR",
index=0, index=0,
number=0, number=0,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='INVALID_CREDENTIALS', name="INVALID_CREDENTIALS",
index=1, index=1,
number=1, number=1,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='BAD_REQUEST', name="BAD_REQUEST",
index=2, index=2,
number=2, number=2,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='UNSUPPORTED_LOGIN_PROTOCOL', name="UNSUPPORTED_LOGIN_PROTOCOL",
index=3, index=3,
number=3, number=3,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='TIMEOUT', name="TIMEOUT",
index=4, index=4,
number=4, number=4,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='UNKNOWN_IDENTIFIER', name="UNKNOWN_IDENTIFIER",
index=5, index=5,
number=5, number=5,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='TOO_MANY_ATTEMPTS', name="TOO_MANY_ATTEMPTS",
index=6, index=6,
number=6, number=6,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='INVALID_PHONENUMBER', name="INVALID_PHONENUMBER",
index=7, index=7,
number=7, number=7,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='TRY_AGAIN_LATER', name="TRY_AGAIN_LATER",
index=8, index=8,
number=8, number=8,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
containing_type=None, containing_type=None,
serialized_options=None, serialized_options=None,
@ -126,26 +147,28 @@ INVALID_PHONENUMBER = 7
TRY_AGAIN_LATER = 8 TRY_AGAIN_LATER = 8
_LOGINRESPONSE_WARNINGS = _descriptor.EnumDescriptor( _LOGINRESPONSE_WARNINGS = _descriptor.EnumDescriptor(
name='Warnings', name="Warnings",
full_name='spotify.login5.v3.LoginResponse.Warnings', full_name="spotify.login5.v3.LoginResponse.Warnings",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
values=[ values=[
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='UNKNOWN_WARNING', name="UNKNOWN_WARNING",
index=0, index=0,
number=0, number=0,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='DEPRECATED_PROTOCOL_VERSION', name="DEPRECATED_PROTOCOL_VERSION",
index=1, index=1,
number=1, number=1,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
containing_type=None, containing_type=None,
serialized_options=None, serialized_options=None,
@ -155,16 +178,16 @@ _LOGINRESPONSE_WARNINGS = _descriptor.EnumDescriptor(
_sym_db.RegisterEnumDescriptor(_LOGINRESPONSE_WARNINGS) _sym_db.RegisterEnumDescriptor(_LOGINRESPONSE_WARNINGS)
_CHALLENGES = _descriptor.Descriptor( _CHALLENGES = _descriptor.Descriptor(
name='Challenges', name="Challenges",
full_name='spotify.login5.v3.Challenges', full_name="spotify.login5.v3.Challenges",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='challenges', name="challenges",
full_name='spotify.login5.v3.Challenges.challenges', full_name="spotify.login5.v3.Challenges.challenges",
index=0, index=0,
number=1, number=1,
type=11, type=11,
@ -179,14 +202,15 @@ _CHALLENGES = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=309, serialized_start=309,
@ -194,16 +218,16 @@ _CHALLENGES = _descriptor.Descriptor(
) )
_CHALLENGE = _descriptor.Descriptor( _CHALLENGE = _descriptor.Descriptor(
name='Challenge', name="Challenge",
full_name='spotify.login5.v3.Challenge', full_name="spotify.login5.v3.Challenge",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='hashcash', name="hashcash",
full_name='spotify.login5.v3.Challenge.hashcash', full_name="spotify.login5.v3.Challenge.hashcash",
index=0, index=0,
number=1, number=1,
type=11, type=11,
@ -218,10 +242,11 @@ _CHALLENGE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='code', name="code",
full_name='spotify.login5.v3.Challenge.code', full_name="spotify.login5.v3.Challenge.code",
index=1, index=1,
number=2, number=2,
type=11, type=11,
@ -236,14 +261,15 @@ _CHALLENGE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=374, serialized_start=374,
@ -251,16 +277,16 @@ _CHALLENGE = _descriptor.Descriptor(
) )
_CHALLENGESOLUTIONS = _descriptor.Descriptor( _CHALLENGESOLUTIONS = _descriptor.Descriptor(
name='ChallengeSolutions', name="ChallengeSolutions",
full_name='spotify.login5.v3.ChallengeSolutions', full_name="spotify.login5.v3.ChallengeSolutions",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='solutions', name="solutions",
full_name='spotify.login5.v3.ChallengeSolutions.solutions', full_name="spotify.login5.v3.ChallengeSolutions.solutions",
index=0, index=0,
number=1, number=1,
type=11, type=11,
@ -275,14 +301,15 @@ _CHALLENGESOLUTIONS = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=513, serialized_start=513,
@ -290,16 +317,16 @@ _CHALLENGESOLUTIONS = _descriptor.Descriptor(
) )
_CHALLENGESOLUTION = _descriptor.Descriptor( _CHALLENGESOLUTION = _descriptor.Descriptor(
name='ChallengeSolution', name="ChallengeSolution",
full_name='spotify.login5.v3.ChallengeSolution', full_name="spotify.login5.v3.ChallengeSolution",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='hashcash', name="hashcash",
full_name='spotify.login5.v3.ChallengeSolution.hashcash', full_name="spotify.login5.v3.ChallengeSolution.hashcash",
index=0, index=0,
number=1, number=1,
type=11, type=11,
@ -314,10 +341,11 @@ _CHALLENGESOLUTION = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='code', name="code",
full_name='spotify.login5.v3.ChallengeSolution.code', full_name="spotify.login5.v3.ChallengeSolution.code",
index=1, index=1,
number=2, number=2,
type=11, type=11,
@ -332,14 +360,15 @@ _CHALLENGESOLUTION = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=593, serialized_start=593,
@ -347,16 +376,16 @@ _CHALLENGESOLUTION = _descriptor.Descriptor(
) )
_LOGINREQUEST = _descriptor.Descriptor( _LOGINREQUEST = _descriptor.Descriptor(
name='LoginRequest', name="LoginRequest",
full_name='spotify.login5.v3.LoginRequest', full_name="spotify.login5.v3.LoginRequest",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='client_info', name="client_info",
full_name='spotify.login5.v3.LoginRequest.client_info', full_name="spotify.login5.v3.LoginRequest.client_info",
index=0, index=0,
number=1, number=1,
type=11, type=11,
@ -371,10 +400,11 @@ _LOGINREQUEST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='login_context', name="login_context",
full_name='spotify.login5.v3.LoginRequest.login_context', full_name="spotify.login5.v3.LoginRequest.login_context",
index=1, index=1,
number=2, number=2,
type=12, type=12,
@ -389,10 +419,11 @@ _LOGINREQUEST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='challenge_solutions', name="challenge_solutions",
full_name='spotify.login5.v3.LoginRequest.challenge_solutions', full_name="spotify.login5.v3.LoginRequest.challenge_solutions",
index=2, index=2,
number=3, number=3,
type=11, type=11,
@ -407,10 +438,11 @@ _LOGINREQUEST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='stored_credential', name="stored_credential",
full_name='spotify.login5.v3.LoginRequest.stored_credential', full_name="spotify.login5.v3.LoginRequest.stored_credential",
index=3, index=3,
number=100, number=100,
type=11, type=11,
@ -425,10 +457,11 @@ _LOGINREQUEST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='password', name="password",
full_name='spotify.login5.v3.LoginRequest.password', full_name="spotify.login5.v3.LoginRequest.password",
index=4, index=4,
number=101, number=101,
type=11, type=11,
@ -443,10 +476,11 @@ _LOGINREQUEST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='facebook_access_token', name="facebook_access_token",
full_name='spotify.login5.v3.LoginRequest.facebook_access_token', full_name="spotify.login5.v3.LoginRequest.facebook_access_token",
index=5, index=5,
number=102, number=102,
type=11, type=11,
@ -461,10 +495,11 @@ _LOGINREQUEST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='phone_number', name="phone_number",
full_name='spotify.login5.v3.LoginRequest.phone_number', full_name="spotify.login5.v3.LoginRequest.phone_number",
index=6, index=6,
number=103, number=103,
type=11, type=11,
@ -479,10 +514,11 @@ _LOGINREQUEST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='one_time_token', name="one_time_token",
full_name='spotify.login5.v3.LoginRequest.one_time_token', full_name="spotify.login5.v3.LoginRequest.one_time_token",
index=7, index=7,
number=104, number=104,
type=11, type=11,
@ -497,10 +533,11 @@ _LOGINREQUEST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='parent_child_credential', name="parent_child_credential",
full_name='spotify.login5.v3.LoginRequest.parent_child_credential', full_name="spotify.login5.v3.LoginRequest.parent_child_credential",
index=8, index=8,
number=105, number=105,
type=11, type=11,
@ -515,10 +552,11 @@ _LOGINREQUEST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='apple_sign_in_credential', name="apple_sign_in_credential",
full_name='spotify.login5.v3.LoginRequest.apple_sign_in_credential', full_name="spotify.login5.v3.LoginRequest.apple_sign_in_credential",
index=9, index=9,
number=106, number=106,
type=11, type=11,
@ -533,14 +571,15 @@ _LOGINREQUEST = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=739, serialized_start=739,
@ -548,23 +587,23 @@ _LOGINREQUEST = _descriptor.Descriptor(
) )
_LOGINOK = _descriptor.Descriptor( _LOGINOK = _descriptor.Descriptor(
name='LoginOk', name="LoginOk",
full_name='spotify.login5.v3.LoginOk', full_name="spotify.login5.v3.LoginOk",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='username', name="username",
full_name='spotify.login5.v3.LoginOk.username', full_name="spotify.login5.v3.LoginOk.username",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -572,17 +611,18 @@ _LOGINOK = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='access_token', name="access_token",
full_name='spotify.login5.v3.LoginOk.access_token', full_name="spotify.login5.v3.LoginOk.access_token",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -590,10 +630,11 @@ _LOGINOK = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='stored_credential', name="stored_credential",
full_name='spotify.login5.v3.LoginOk.stored_credential', full_name="spotify.login5.v3.LoginOk.stored_credential",
index=2, index=2,
number=3, number=3,
type=12, type=12,
@ -608,10 +649,11 @@ _LOGINOK = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='access_token_expires_in', name="access_token_expires_in",
full_name='spotify.login5.v3.LoginOk.access_token_expires_in', full_name="spotify.login5.v3.LoginOk.access_token_expires_in",
index=3, index=3,
number=4, number=4,
type=5, type=5,
@ -626,14 +668,15 @@ _LOGINOK = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=1426, serialized_start=1426,
@ -641,16 +684,16 @@ _LOGINOK = _descriptor.Descriptor(
) )
_LOGINRESPONSE = _descriptor.Descriptor( _LOGINRESPONSE = _descriptor.Descriptor(
name='LoginResponse', name="LoginResponse",
full_name='spotify.login5.v3.LoginResponse', full_name="spotify.login5.v3.LoginResponse",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='ok', name="ok",
full_name='spotify.login5.v3.LoginResponse.ok', full_name="spotify.login5.v3.LoginResponse.ok",
index=0, index=0,
number=1, number=1,
type=11, type=11,
@ -665,10 +708,11 @@ _LOGINRESPONSE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='error', name="error",
full_name='spotify.login5.v3.LoginResponse.error', full_name="spotify.login5.v3.LoginResponse.error",
index=1, index=1,
number=2, number=2,
type=14, type=14,
@ -683,10 +727,11 @@ _LOGINRESPONSE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='challenges', name="challenges",
full_name='spotify.login5.v3.LoginResponse.challenges', full_name="spotify.login5.v3.LoginResponse.challenges",
index=2, index=2,
number=3, number=3,
type=11, type=11,
@ -701,10 +746,11 @@ _LOGINRESPONSE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='warnings', name="warnings",
full_name='spotify.login5.v3.LoginResponse.warnings', full_name="spotify.login5.v3.LoginResponse.warnings",
index=3, index=3,
number=4, number=4,
type=14, type=14,
@ -719,10 +765,11 @@ _LOGINRESPONSE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='login_context', name="login_context",
full_name='spotify.login5.v3.LoginResponse.login_context', full_name="spotify.login5.v3.LoginResponse.login_context",
index=4, index=4,
number=5, number=5,
type=12, type=12,
@ -737,17 +784,18 @@ _LOGINRESPONSE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='identifier_token', name="identifier_token",
full_name='spotify.login5.v3.LoginResponse.identifier_token', full_name="spotify.login5.v3.LoginResponse.identifier_token",
index=5, index=5,
number=6, number=6,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -755,10 +803,11 @@ _LOGINRESPONSE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='user_info', name="user_info",
full_name='spotify.login5.v3.LoginResponse.user_info', full_name="spotify.login5.v3.LoginResponse.user_info",
index=6, index=6,
number=7, number=7,
type=11, type=11,
@ -773,7 +822,8 @@ _LOGINRESPONSE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
@ -782,127 +832,163 @@ _LOGINRESPONSE = _descriptor.Descriptor(
], ],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=1538, serialized_start=1538,
serialized_end=1914, serialized_end=1914,
) )
_CHALLENGES.fields_by_name['challenges'].message_type = _CHALLENGE _CHALLENGES.fields_by_name["challenges"].message_type = _CHALLENGE
_CHALLENGE.fields_by_name[ _CHALLENGE.fields_by_name[
'hashcash'].message_type = spotify_dot_login5_dot_v3_dot_challenges_dot_hashcash__pb2._HASHCASHCHALLENGE "hashcash"
].message_type = (
spotify_dot_login5_dot_v3_dot_challenges_dot_hashcash__pb2._HASHCASHCHALLENGE
)
_CHALLENGE.fields_by_name[ _CHALLENGE.fields_by_name[
'code'].message_type = spotify_dot_login5_dot_v3_dot_challenges_dot_code__pb2._CODECHALLENGE "code"
_CHALLENGESOLUTIONS.fields_by_name[ ].message_type = spotify_dot_login5_dot_v3_dot_challenges_dot_code__pb2._CODECHALLENGE
'solutions'].message_type = _CHALLENGESOLUTION _CHALLENGESOLUTIONS.fields_by_name["solutions"].message_type = _CHALLENGESOLUTION
_CHALLENGESOLUTION.fields_by_name[ _CHALLENGESOLUTION.fields_by_name[
'hashcash'].message_type = spotify_dot_login5_dot_v3_dot_challenges_dot_hashcash__pb2._HASHCASHSOLUTION "hashcash"
].message_type = (
spotify_dot_login5_dot_v3_dot_challenges_dot_hashcash__pb2._HASHCASHSOLUTION
)
_CHALLENGESOLUTION.fields_by_name[ _CHALLENGESOLUTION.fields_by_name[
'code'].message_type = spotify_dot_login5_dot_v3_dot_challenges_dot_code__pb2._CODESOLUTION "code"
].message_type = spotify_dot_login5_dot_v3_dot_challenges_dot_code__pb2._CODESOLUTION
_LOGINREQUEST.fields_by_name[ _LOGINREQUEST.fields_by_name[
'client_info'].message_type = spotify_dot_login5_dot_v3_dot_client__info__pb2._CLIENTINFO "client_info"
].message_type = spotify_dot_login5_dot_v3_dot_client__info__pb2._CLIENTINFO
_LOGINREQUEST.fields_by_name["challenge_solutions"].message_type = _CHALLENGESOLUTIONS
_LOGINREQUEST.fields_by_name[ _LOGINREQUEST.fields_by_name[
'challenge_solutions'].message_type = _CHALLENGESOLUTIONS "stored_credential"
].message_type = (
spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2._STOREDCREDENTIAL
)
_LOGINREQUEST.fields_by_name[ _LOGINREQUEST.fields_by_name[
'stored_credential'].message_type = spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2._STOREDCREDENTIAL "password"
].message_type = (
spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2._PASSWORD
)
_LOGINREQUEST.fields_by_name[ _LOGINREQUEST.fields_by_name[
'password'].message_type = spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2._PASSWORD "facebook_access_token"
].message_type = (
spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2._FACEBOOKACCESSTOKEN
)
_LOGINREQUEST.fields_by_name[ _LOGINREQUEST.fields_by_name[
'facebook_access_token'].message_type = spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2._FACEBOOKACCESSTOKEN "phone_number"
].message_type = (
spotify_dot_login5_dot_v3_dot_identifiers_dot_identifiers__pb2._PHONENUMBER
)
_LOGINREQUEST.fields_by_name[ _LOGINREQUEST.fields_by_name[
'phone_number'].message_type = spotify_dot_login5_dot_v3_dot_identifiers_dot_identifiers__pb2._PHONENUMBER "one_time_token"
].message_type = (
spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2._ONETIMETOKEN
)
_LOGINREQUEST.fields_by_name[ _LOGINREQUEST.fields_by_name[
'one_time_token'].message_type = spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2._ONETIMETOKEN "parent_child_credential"
].message_type = (
spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2._PARENTCHILDCREDENTIAL
)
_LOGINREQUEST.fields_by_name[ _LOGINREQUEST.fields_by_name[
'parent_child_credential'].message_type = spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2._PARENTCHILDCREDENTIAL "apple_sign_in_credential"
_LOGINREQUEST.fields_by_name[ ].message_type = (
'apple_sign_in_credential'].message_type = spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2._APPLESIGNINCREDENTIAL spotify_dot_login5_dot_v3_dot_credentials_dot_credentials__pb2._APPLESIGNINCREDENTIAL
_LOGINRESPONSE.fields_by_name['ok'].message_type = _LOGINOK )
_LOGINRESPONSE.fields_by_name['error'].enum_type = _LOGINERROR _LOGINRESPONSE.fields_by_name["ok"].message_type = _LOGINOK
_LOGINRESPONSE.fields_by_name['challenges'].message_type = _CHALLENGES _LOGINRESPONSE.fields_by_name["error"].enum_type = _LOGINERROR
_LOGINRESPONSE.fields_by_name['warnings'].enum_type = _LOGINRESPONSE_WARNINGS _LOGINRESPONSE.fields_by_name["challenges"].message_type = _CHALLENGES
_LOGINRESPONSE.fields_by_name["warnings"].enum_type = _LOGINRESPONSE_WARNINGS
_LOGINRESPONSE.fields_by_name[ _LOGINRESPONSE.fields_by_name[
'user_info'].message_type = spotify_dot_login5_dot_v3_dot_user__info__pb2._USERINFO "user_info"
].message_type = spotify_dot_login5_dot_v3_dot_user__info__pb2._USERINFO
_LOGINRESPONSE_WARNINGS.containing_type = _LOGINRESPONSE _LOGINRESPONSE_WARNINGS.containing_type = _LOGINRESPONSE
DESCRIPTOR.message_types_by_name['Challenges'] = _CHALLENGES DESCRIPTOR.message_types_by_name["Challenges"] = _CHALLENGES
DESCRIPTOR.message_types_by_name['Challenge'] = _CHALLENGE DESCRIPTOR.message_types_by_name["Challenge"] = _CHALLENGE
DESCRIPTOR.message_types_by_name['ChallengeSolutions'] = _CHALLENGESOLUTIONS DESCRIPTOR.message_types_by_name["ChallengeSolutions"] = _CHALLENGESOLUTIONS
DESCRIPTOR.message_types_by_name['ChallengeSolution'] = _CHALLENGESOLUTION DESCRIPTOR.message_types_by_name["ChallengeSolution"] = _CHALLENGESOLUTION
DESCRIPTOR.message_types_by_name['LoginRequest'] = _LOGINREQUEST DESCRIPTOR.message_types_by_name["LoginRequest"] = _LOGINREQUEST
DESCRIPTOR.message_types_by_name['LoginOk'] = _LOGINOK DESCRIPTOR.message_types_by_name["LoginOk"] = _LOGINOK
DESCRIPTOR.message_types_by_name['LoginResponse'] = _LOGINRESPONSE DESCRIPTOR.message_types_by_name["LoginResponse"] = _LOGINRESPONSE
DESCRIPTOR.enum_types_by_name['LoginError'] = _LOGINERROR DESCRIPTOR.enum_types_by_name["LoginError"] = _LOGINERROR
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
Challenges = _reflection.GeneratedProtocolMessageType( Challenges = _reflection.GeneratedProtocolMessageType(
'Challenges', "Challenges",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _CHALLENGES, "DESCRIPTOR": _CHALLENGES,
'__module__': 'spotify.login5.v3.login5_pb2' "__module__": "spotify.login5.v3.login5_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.Challenges) # @@protoc_insertion_point(class_scope:spotify.login5.v3.Challenges)
}) },
)
_sym_db.RegisterMessage(Challenges) _sym_db.RegisterMessage(Challenges)
Challenge = _reflection.GeneratedProtocolMessageType( Challenge = _reflection.GeneratedProtocolMessageType(
'Challenge', "Challenge",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _CHALLENGE, "DESCRIPTOR": _CHALLENGE,
'__module__': 'spotify.login5.v3.login5_pb2' "__module__": "spotify.login5.v3.login5_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.Challenge) # @@protoc_insertion_point(class_scope:spotify.login5.v3.Challenge)
}) },
)
_sym_db.RegisterMessage(Challenge) _sym_db.RegisterMessage(Challenge)
ChallengeSolutions = _reflection.GeneratedProtocolMessageType( ChallengeSolutions = _reflection.GeneratedProtocolMessageType(
'ChallengeSolutions', "ChallengeSolutions",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _CHALLENGESOLUTIONS, "DESCRIPTOR": _CHALLENGESOLUTIONS,
'__module__': 'spotify.login5.v3.login5_pb2' "__module__": "spotify.login5.v3.login5_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.ChallengeSolutions) # @@protoc_insertion_point(class_scope:spotify.login5.v3.ChallengeSolutions)
}) },
)
_sym_db.RegisterMessage(ChallengeSolutions) _sym_db.RegisterMessage(ChallengeSolutions)
ChallengeSolution = _reflection.GeneratedProtocolMessageType( ChallengeSolution = _reflection.GeneratedProtocolMessageType(
'ChallengeSolution', "ChallengeSolution",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _CHALLENGESOLUTION, "DESCRIPTOR": _CHALLENGESOLUTION,
'__module__': 'spotify.login5.v3.login5_pb2' "__module__": "spotify.login5.v3.login5_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.ChallengeSolution) # @@protoc_insertion_point(class_scope:spotify.login5.v3.ChallengeSolution)
}) },
)
_sym_db.RegisterMessage(ChallengeSolution) _sym_db.RegisterMessage(ChallengeSolution)
LoginRequest = _reflection.GeneratedProtocolMessageType( LoginRequest = _reflection.GeneratedProtocolMessageType(
'LoginRequest', "LoginRequest",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _LOGINREQUEST, "DESCRIPTOR": _LOGINREQUEST,
'__module__': 'spotify.login5.v3.login5_pb2' "__module__": "spotify.login5.v3.login5_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.LoginRequest) # @@protoc_insertion_point(class_scope:spotify.login5.v3.LoginRequest)
}) },
)
_sym_db.RegisterMessage(LoginRequest) _sym_db.RegisterMessage(LoginRequest)
LoginOk = _reflection.GeneratedProtocolMessageType( LoginOk = _reflection.GeneratedProtocolMessageType(
'LoginOk', "LoginOk",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _LOGINOK, "DESCRIPTOR": _LOGINOK,
'__module__': 'spotify.login5.v3.login5_pb2' "__module__": "spotify.login5.v3.login5_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.LoginOk) # @@protoc_insertion_point(class_scope:spotify.login5.v3.LoginOk)
}) },
)
_sym_db.RegisterMessage(LoginOk) _sym_db.RegisterMessage(LoginOk)
LoginResponse = _reflection.GeneratedProtocolMessageType( LoginResponse = _reflection.GeneratedProtocolMessageType(
'LoginResponse', "LoginResponse",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _LOGINRESPONSE, "DESCRIPTOR": _LOGINRESPONSE,
'__module__': 'spotify.login5.v3.login5_pb2' "__module__": "spotify.login5.v3.login5_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.LoginResponse) # @@protoc_insertion_point(class_scope:spotify.login5.v3.LoginResponse)
}) },
)
_sym_db.RegisterMessage(LoginResponse) _sym_db.RegisterMessage(LoginResponse)
DESCRIPTOR._options = None DESCRIPTOR._options = None

View File

@ -6,54 +6,59 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='spotify/login5/v3/user_info.proto', name="spotify/login5/v3/user_info.proto",
package='spotify.login5.v3', package="spotify.login5.v3",
syntax='proto3', syntax="proto3",
serialized_options=b'\n\024com.spotify.login5v3', serialized_options=b"\n\024com.spotify.login5v3",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n!spotify/login5/v3/user_info.proto\x12\x11spotify.login5.v3\"\x97\x02\n\x08UserInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x65mail\x18\x02 \x01(\t\x12\x16\n\x0e\x65mail_verified\x18\x03 \x01(\x08\x12\x11\n\tbirthdate\x18\x04 \x01(\t\x12\x32\n\x06gender\x18\x05 \x01(\x0e\x32\".spotify.login5.v3.UserInfo.Gender\x12\x14\n\x0cphone_number\x18\x06 \x01(\t\x12\x1d\n\x15phone_number_verified\x18\x07 \x01(\x08\x12 \n\x18\x65mail_already_registered\x18\x08 \x01(\x08\"8\n\x06Gender\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04MALE\x10\x01\x12\n\n\x06\x46\x45MALE\x10\x02\x12\x0b\n\x07NEUTRAL\x10\x03\x42\x16\n\x14\x63om.spotify.login5v3b\x06proto3' serialized_pb=b'\n!spotify/login5/v3/user_info.proto\x12\x11spotify.login5.v3"\x97\x02\n\x08UserInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x65mail\x18\x02 \x01(\t\x12\x16\n\x0e\x65mail_verified\x18\x03 \x01(\x08\x12\x11\n\tbirthdate\x18\x04 \x01(\t\x12\x32\n\x06gender\x18\x05 \x01(\x0e\x32".spotify.login5.v3.UserInfo.Gender\x12\x14\n\x0cphone_number\x18\x06 \x01(\t\x12\x1d\n\x15phone_number_verified\x18\x07 \x01(\x08\x12 \n\x18\x65mail_already_registered\x18\x08 \x01(\x08"8\n\x06Gender\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04MALE\x10\x01\x12\n\n\x06\x46\x45MALE\x10\x02\x12\x0b\n\x07NEUTRAL\x10\x03\x42\x16\n\x14\x63om.spotify.login5v3b\x06proto3',
) )
_USERINFO_GENDER = _descriptor.EnumDescriptor( _USERINFO_GENDER = _descriptor.EnumDescriptor(
name='Gender', name="Gender",
full_name='spotify.login5.v3.UserInfo.Gender', full_name="spotify.login5.v3.UserInfo.Gender",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
values=[ values=[
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='UNKNOWN', name="UNKNOWN",
index=0, index=0,
number=0, number=0,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='MALE', name="MALE",
index=1, index=1,
number=1, number=1,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='FEMALE', name="FEMALE",
index=2, index=2,
number=2, number=2,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='NEUTRAL', name="NEUTRAL",
index=3, index=3,
number=3, number=3,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
containing_type=None, containing_type=None,
serialized_options=None, serialized_options=None,
@ -63,23 +68,23 @@ _USERINFO_GENDER = _descriptor.EnumDescriptor(
_sym_db.RegisterEnumDescriptor(_USERINFO_GENDER) _sym_db.RegisterEnumDescriptor(_USERINFO_GENDER)
_USERINFO = _descriptor.Descriptor( _USERINFO = _descriptor.Descriptor(
name='UserInfo', name="UserInfo",
full_name='spotify.login5.v3.UserInfo', full_name="spotify.login5.v3.UserInfo",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='name', name="name",
full_name='spotify.login5.v3.UserInfo.name', full_name="spotify.login5.v3.UserInfo.name",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -87,17 +92,18 @@ _USERINFO = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='email', name="email",
full_name='spotify.login5.v3.UserInfo.email', full_name="spotify.login5.v3.UserInfo.email",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -105,10 +111,11 @@ _USERINFO = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='email_verified', name="email_verified",
full_name='spotify.login5.v3.UserInfo.email_verified', full_name="spotify.login5.v3.UserInfo.email_verified",
index=2, index=2,
number=3, number=3,
type=8, type=8,
@ -123,17 +130,18 @@ _USERINFO = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='birthdate', name="birthdate",
full_name='spotify.login5.v3.UserInfo.birthdate', full_name="spotify.login5.v3.UserInfo.birthdate",
index=3, index=3,
number=4, number=4,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -141,10 +149,11 @@ _USERINFO = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='gender', name="gender",
full_name='spotify.login5.v3.UserInfo.gender', full_name="spotify.login5.v3.UserInfo.gender",
index=4, index=4,
number=5, number=5,
type=14, type=14,
@ -159,17 +168,18 @@ _USERINFO = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='phone_number', name="phone_number",
full_name='spotify.login5.v3.UserInfo.phone_number', full_name="spotify.login5.v3.UserInfo.phone_number",
index=5, index=5,
number=6, number=6,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -177,10 +187,11 @@ _USERINFO = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='phone_number_verified', name="phone_number_verified",
full_name='spotify.login5.v3.UserInfo.phone_number_verified', full_name="spotify.login5.v3.UserInfo.phone_number_verified",
index=6, index=6,
number=7, number=7,
type=8, type=8,
@ -195,10 +206,11 @@ _USERINFO = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='email_already_registered', name="email_already_registered",
full_name='spotify.login5.v3.UserInfo.email_already_registered', full_name="spotify.login5.v3.UserInfo.email_already_registered",
index=7, index=7,
number=8, number=8,
type=8, type=8,
@ -213,7 +225,8 @@ _USERINFO = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
@ -222,26 +235,27 @@ _USERINFO = _descriptor.Descriptor(
], ],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=57, serialized_start=57,
serialized_end=336, serialized_end=336,
) )
_USERINFO.fields_by_name['gender'].enum_type = _USERINFO_GENDER _USERINFO.fields_by_name["gender"].enum_type = _USERINFO_GENDER
_USERINFO_GENDER.containing_type = _USERINFO _USERINFO_GENDER.containing_type = _USERINFO
DESCRIPTOR.message_types_by_name['UserInfo'] = _USERINFO DESCRIPTOR.message_types_by_name["UserInfo"] = _USERINFO
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
UserInfo = _reflection.GeneratedProtocolMessageType( UserInfo = _reflection.GeneratedProtocolMessageType(
'UserInfo', "UserInfo",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _USERINFO, "DESCRIPTOR": _USERINFO,
'__module__': 'spotify.login5.v3.user_info_pb2' "__module__": "spotify.login5.v3.user_info_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.UserInfo) # @@protoc_insertion_point(class_scope:spotify.login5.v3.UserInfo)
}) },
)
_sym_db.RegisterMessage(UserInfo) _sym_db.RegisterMessage(UserInfo)
DESCRIPTOR._options = None DESCRIPTOR._options = None

View File

@ -6,40 +6,43 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='spotify/login5/v3/challenges/code.proto', name="spotify/login5/v3/challenges/code.proto",
package='spotify.login5.v3.challenges', package="spotify.login5.v3.challenges",
syntax='proto3', syntax="proto3",
serialized_options=b'\n\024com.spotify.login5v3', serialized_options=b"\n\024com.spotify.login5v3",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\'spotify/login5/v3/challenges/code.proto\x12\x1cspotify.login5.v3.challenges\"\xbc\x01\n\rCodeChallenge\x12\x42\n\x06method\x18\x01 \x01(\x0e\x32\x32.spotify.login5.v3.challenges.CodeChallenge.Method\x12\x13\n\x0b\x63ode_length\x18\x02 \x01(\x05\x12\x12\n\nexpires_in\x18\x03 \x01(\x05\x12\x1e\n\x16\x63\x61nonical_phone_number\x18\x04 \x01(\t\"\x1e\n\x06Method\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x07\n\x03SMS\x10\x01\"\x1c\n\x0c\x43odeSolution\x12\x0c\n\x04\x63ode\x18\x01 \x01(\tB\x16\n\x14\x63om.spotify.login5v3b\x06proto3' serialized_pb=b'\n\'spotify/login5/v3/challenges/code.proto\x12\x1cspotify.login5.v3.challenges"\xbc\x01\n\rCodeChallenge\x12\x42\n\x06method\x18\x01 \x01(\x0e\x32\x32.spotify.login5.v3.challenges.CodeChallenge.Method\x12\x13\n\x0b\x63ode_length\x18\x02 \x01(\x05\x12\x12\n\nexpires_in\x18\x03 \x01(\x05\x12\x1e\n\x16\x63\x61nonical_phone_number\x18\x04 \x01(\t"\x1e\n\x06Method\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x07\n\x03SMS\x10\x01"\x1c\n\x0c\x43odeSolution\x12\x0c\n\x04\x63ode\x18\x01 \x01(\tB\x16\n\x14\x63om.spotify.login5v3b\x06proto3',
) )
_CODECHALLENGE_METHOD = _descriptor.EnumDescriptor( _CODECHALLENGE_METHOD = _descriptor.EnumDescriptor(
name='Method', name="Method",
full_name='spotify.login5.v3.challenges.CodeChallenge.Method', full_name="spotify.login5.v3.challenges.CodeChallenge.Method",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
values=[ values=[
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='UNKNOWN', name="UNKNOWN",
index=0, index=0,
number=0, number=0,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.EnumValueDescriptor( _descriptor.EnumValueDescriptor(
name='SMS', name="SMS",
index=1, index=1,
number=1, number=1,
serialized_options=None, serialized_options=None,
type=None, type=None,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
containing_type=None, containing_type=None,
serialized_options=None, serialized_options=None,
@ -49,16 +52,16 @@ _CODECHALLENGE_METHOD = _descriptor.EnumDescriptor(
_sym_db.RegisterEnumDescriptor(_CODECHALLENGE_METHOD) _sym_db.RegisterEnumDescriptor(_CODECHALLENGE_METHOD)
_CODECHALLENGE = _descriptor.Descriptor( _CODECHALLENGE = _descriptor.Descriptor(
name='CodeChallenge', name="CodeChallenge",
full_name='spotify.login5.v3.challenges.CodeChallenge', full_name="spotify.login5.v3.challenges.CodeChallenge",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='method', name="method",
full_name='spotify.login5.v3.challenges.CodeChallenge.method', full_name="spotify.login5.v3.challenges.CodeChallenge.method",
index=0, index=0,
number=1, number=1,
type=14, type=14,
@ -73,10 +76,11 @@ _CODECHALLENGE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='code_length', name="code_length",
full_name='spotify.login5.v3.challenges.CodeChallenge.code_length', full_name="spotify.login5.v3.challenges.CodeChallenge.code_length",
index=1, index=1,
number=2, number=2,
type=5, type=5,
@ -91,10 +95,11 @@ _CODECHALLENGE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='expires_in', name="expires_in",
full_name='spotify.login5.v3.challenges.CodeChallenge.expires_in', full_name="spotify.login5.v3.challenges.CodeChallenge.expires_in",
index=2, index=2,
number=3, number=3,
type=5, type=5,
@ -109,17 +114,18 @@ _CODECHALLENGE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='canonical_phone_number', name="canonical_phone_number",
full_name='spotify.login5.v3.challenges.CodeChallenge.canonical_phone_number', full_name="spotify.login5.v3.challenges.CodeChallenge.canonical_phone_number",
index=3, index=3,
number=4, number=4,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -127,7 +133,8 @@ _CODECHALLENGE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
@ -136,7 +143,7 @@ _CODECHALLENGE = _descriptor.Descriptor(
], ],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=74, serialized_start=74,
@ -144,23 +151,23 @@ _CODECHALLENGE = _descriptor.Descriptor(
) )
_CODESOLUTION = _descriptor.Descriptor( _CODESOLUTION = _descriptor.Descriptor(
name='CodeSolution', name="CodeSolution",
full_name='spotify.login5.v3.challenges.CodeSolution', full_name="spotify.login5.v3.challenges.CodeSolution",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='code', name="code",
full_name='spotify.login5.v3.challenges.CodeSolution.code', full_name="spotify.login5.v3.challenges.CodeSolution.code",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -168,44 +175,47 @@ _CODESOLUTION = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=264, serialized_start=264,
serialized_end=292, serialized_end=292,
) )
_CODECHALLENGE.fields_by_name['method'].enum_type = _CODECHALLENGE_METHOD _CODECHALLENGE.fields_by_name["method"].enum_type = _CODECHALLENGE_METHOD
_CODECHALLENGE_METHOD.containing_type = _CODECHALLENGE _CODECHALLENGE_METHOD.containing_type = _CODECHALLENGE
DESCRIPTOR.message_types_by_name['CodeChallenge'] = _CODECHALLENGE DESCRIPTOR.message_types_by_name["CodeChallenge"] = _CODECHALLENGE
DESCRIPTOR.message_types_by_name['CodeSolution'] = _CODESOLUTION DESCRIPTOR.message_types_by_name["CodeSolution"] = _CODESOLUTION
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
CodeChallenge = _reflection.GeneratedProtocolMessageType( CodeChallenge = _reflection.GeneratedProtocolMessageType(
'CodeChallenge', "CodeChallenge",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _CODECHALLENGE, "DESCRIPTOR": _CODECHALLENGE,
'__module__': 'spotify.login5.v3.challenges.code_pb2' "__module__": "spotify.login5.v3.challenges.code_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.challenges.CodeChallenge) # @@protoc_insertion_point(class_scope:spotify.login5.v3.challenges.CodeChallenge)
}) },
)
_sym_db.RegisterMessage(CodeChallenge) _sym_db.RegisterMessage(CodeChallenge)
CodeSolution = _reflection.GeneratedProtocolMessageType( CodeSolution = _reflection.GeneratedProtocolMessageType(
'CodeSolution', "CodeSolution",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _CODESOLUTION, "DESCRIPTOR": _CODESOLUTION,
'__module__': 'spotify.login5.v3.challenges.code_pb2' "__module__": "spotify.login5.v3.challenges.code_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.challenges.CodeSolution) # @@protoc_insertion_point(class_scope:spotify.login5.v3.challenges.CodeSolution)
}) },
)
_sym_db.RegisterMessage(CodeSolution) _sym_db.RegisterMessage(CodeSolution)
DESCRIPTOR._options = None DESCRIPTOR._options = None

View File

@ -7,33 +7,35 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='spotify/login5/v3/challenges/hashcash.proto', name="spotify/login5/v3/challenges/hashcash.proto",
package='spotify.login5.v3.challenges', package="spotify.login5.v3.challenges",
syntax='proto3', syntax="proto3",
serialized_options=b'\n\024com.spotify.login5v3', serialized_options=b"\n\024com.spotify.login5v3",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n+spotify/login5/v3/challenges/hashcash.proto\x12\x1cspotify.login5.v3.challenges\x1a\x1egoogle/protobuf/duration.proto\"3\n\x11HashcashChallenge\x12\x0e\n\x06prefix\x18\x01 \x01(\x0c\x12\x0e\n\x06length\x18\x02 \x01(\x05\"O\n\x10HashcashSolution\x12\x0e\n\x06suffix\x18\x01 \x01(\x0c\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x16\n\x14\x63om.spotify.login5v3b\x06proto3', serialized_pb=b'\n+spotify/login5/v3/challenges/hashcash.proto\x12\x1cspotify.login5.v3.challenges\x1a\x1egoogle/protobuf/duration.proto"3\n\x11HashcashChallenge\x12\x0e\n\x06prefix\x18\x01 \x01(\x0c\x12\x0e\n\x06length\x18\x02 \x01(\x05"O\n\x10HashcashSolution\x12\x0e\n\x06suffix\x18\x01 \x01(\x0c\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x16\n\x14\x63om.spotify.login5v3b\x06proto3',
dependencies=[ dependencies=[
google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,
]) ],
)
_HASHCASHCHALLENGE = _descriptor.Descriptor( _HASHCASHCHALLENGE = _descriptor.Descriptor(
name='HashcashChallenge', name="HashcashChallenge",
full_name='spotify.login5.v3.challenges.HashcashChallenge', full_name="spotify.login5.v3.challenges.HashcashChallenge",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='prefix', name="prefix",
full_name='spotify.login5.v3.challenges.HashcashChallenge.prefix', full_name="spotify.login5.v3.challenges.HashcashChallenge.prefix",
index=0, index=0,
number=1, number=1,
type=12, type=12,
@ -48,10 +50,11 @@ _HASHCASHCHALLENGE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='length', name="length",
full_name='spotify.login5.v3.challenges.HashcashChallenge.length', full_name="spotify.login5.v3.challenges.HashcashChallenge.length",
index=1, index=1,
number=2, number=2,
type=5, type=5,
@ -66,14 +69,15 @@ _HASHCASHCHALLENGE = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=109, serialized_start=109,
@ -81,16 +85,16 @@ _HASHCASHCHALLENGE = _descriptor.Descriptor(
) )
_HASHCASHSOLUTION = _descriptor.Descriptor( _HASHCASHSOLUTION = _descriptor.Descriptor(
name='HashcashSolution', name="HashcashSolution",
full_name='spotify.login5.v3.challenges.HashcashSolution', full_name="spotify.login5.v3.challenges.HashcashSolution",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='suffix', name="suffix",
full_name='spotify.login5.v3.challenges.HashcashSolution.suffix', full_name="spotify.login5.v3.challenges.HashcashSolution.suffix",
index=0, index=0,
number=1, number=1,
type=12, type=12,
@ -105,10 +109,11 @@ _HASHCASHSOLUTION = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='duration', name="duration",
full_name='spotify.login5.v3.challenges.HashcashSolution.duration', full_name="spotify.login5.v3.challenges.HashcashSolution.duration",
index=1, index=1,
number=2, number=2,
type=11, type=11,
@ -123,14 +128,15 @@ _HASHCASHSOLUTION = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=162, serialized_start=162,
@ -138,29 +144,32 @@ _HASHCASHSOLUTION = _descriptor.Descriptor(
) )
_HASHCASHSOLUTION.fields_by_name[ _HASHCASHSOLUTION.fields_by_name[
'duration'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION "duration"
DESCRIPTOR.message_types_by_name['HashcashChallenge'] = _HASHCASHCHALLENGE ].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
DESCRIPTOR.message_types_by_name['HashcashSolution'] = _HASHCASHSOLUTION DESCRIPTOR.message_types_by_name["HashcashChallenge"] = _HASHCASHCHALLENGE
DESCRIPTOR.message_types_by_name["HashcashSolution"] = _HASHCASHSOLUTION
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
HashcashChallenge = _reflection.GeneratedProtocolMessageType( HashcashChallenge = _reflection.GeneratedProtocolMessageType(
'HashcashChallenge', "HashcashChallenge",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _HASHCASHCHALLENGE, "DESCRIPTOR": _HASHCASHCHALLENGE,
'__module__': 'spotify.login5.v3.challenges.hashcash_pb2' "__module__": "spotify.login5.v3.challenges.hashcash_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.challenges.HashcashChallenge) # @@protoc_insertion_point(class_scope:spotify.login5.v3.challenges.HashcashChallenge)
}) },
)
_sym_db.RegisterMessage(HashcashChallenge) _sym_db.RegisterMessage(HashcashChallenge)
HashcashSolution = _reflection.GeneratedProtocolMessageType( HashcashSolution = _reflection.GeneratedProtocolMessageType(
'HashcashSolution', "HashcashSolution",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _HASHCASHSOLUTION, "DESCRIPTOR": _HASHCASHSOLUTION,
'__module__': 'spotify.login5.v3.challenges.hashcash_pb2' "__module__": "spotify.login5.v3.challenges.hashcash_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.challenges.HashcashSolution) # @@protoc_insertion_point(class_scope:spotify.login5.v3.challenges.HashcashSolution)
}) },
)
_sym_db.RegisterMessage(HashcashSolution) _sym_db.RegisterMessage(HashcashSolution)
DESCRIPTOR._options = None DESCRIPTOR._options = None

View File

@ -6,37 +6,38 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='spotify/login5/v3/credentials/credentials.proto', name="spotify/login5/v3/credentials/credentials.proto",
package='spotify.login5.v3.credentials', package="spotify.login5.v3.credentials",
syntax='proto3', syntax="proto3",
serialized_options=b'\n\024com.spotify.login5v3', serialized_options=b"\n\024com.spotify.login5v3",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n/spotify/login5/v3/credentials/credentials.proto\x12\x1dspotify.login5.v3.credentials\"2\n\x10StoredCredential\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"9\n\x08Password\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\x12\x0f\n\x07padding\x18\x03 \x01(\x0c\";\n\x13\x46\x61\x63\x65\x62ookAccessToken\x12\x0e\n\x06\x66\x62_uid\x18\x01 \x01(\t\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x02 \x01(\t\"\x1d\n\x0cOneTimeToken\x12\r\n\x05token\x18\x01 \x01(\t\"|\n\x15ParentChildCredential\x12\x10\n\x08\x63hild_id\x18\x01 \x01(\t\x12Q\n\x18parent_stored_credential\x18\x02 \x01(\x0b\x32/.spotify.login5.v3.credentials.StoredCredential\"S\n\x15\x41ppleSignInCredential\x12\x11\n\tauth_code\x18\x01 \x01(\t\x12\x14\n\x0credirect_uri\x18\x02 \x01(\t\x12\x11\n\tbundle_id\x18\x03 \x01(\tB\x16\n\x14\x63om.spotify.login5v3b\x06proto3' serialized_pb=b'\n/spotify/login5/v3/credentials/credentials.proto\x12\x1dspotify.login5.v3.credentials"2\n\x10StoredCredential\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c"9\n\x08Password\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\x12\x0f\n\x07padding\x18\x03 \x01(\x0c";\n\x13\x46\x61\x63\x65\x62ookAccessToken\x12\x0e\n\x06\x66\x62_uid\x18\x01 \x01(\t\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x02 \x01(\t"\x1d\n\x0cOneTimeToken\x12\r\n\x05token\x18\x01 \x01(\t"|\n\x15ParentChildCredential\x12\x10\n\x08\x63hild_id\x18\x01 \x01(\t\x12Q\n\x18parent_stored_credential\x18\x02 \x01(\x0b\x32/.spotify.login5.v3.credentials.StoredCredential"S\n\x15\x41ppleSignInCredential\x12\x11\n\tauth_code\x18\x01 \x01(\t\x12\x14\n\x0credirect_uri\x18\x02 \x01(\t\x12\x11\n\tbundle_id\x18\x03 \x01(\tB\x16\n\x14\x63om.spotify.login5v3b\x06proto3',
) )
_STOREDCREDENTIAL = _descriptor.Descriptor( _STOREDCREDENTIAL = _descriptor.Descriptor(
name='StoredCredential', name="StoredCredential",
full_name='spotify.login5.v3.credentials.StoredCredential', full_name="spotify.login5.v3.credentials.StoredCredential",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='username', name="username",
full_name='spotify.login5.v3.credentials.StoredCredential.username', full_name="spotify.login5.v3.credentials.StoredCredential.username",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -44,10 +45,11 @@ _STOREDCREDENTIAL = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='data', name="data",
full_name='spotify.login5.v3.credentials.StoredCredential.data', full_name="spotify.login5.v3.credentials.StoredCredential.data",
index=1, index=1,
number=2, number=2,
type=12, type=12,
@ -62,14 +64,15 @@ _STOREDCREDENTIAL = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=82, serialized_start=82,
@ -77,23 +80,23 @@ _STOREDCREDENTIAL = _descriptor.Descriptor(
) )
_PASSWORD = _descriptor.Descriptor( _PASSWORD = _descriptor.Descriptor(
name='Password', name="Password",
full_name='spotify.login5.v3.credentials.Password', full_name="spotify.login5.v3.credentials.Password",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='id', name="id",
full_name='spotify.login5.v3.credentials.Password.id', full_name="spotify.login5.v3.credentials.Password.id",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -101,17 +104,18 @@ _PASSWORD = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='password', name="password",
full_name='spotify.login5.v3.credentials.Password.password', full_name="spotify.login5.v3.credentials.Password.password",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -119,10 +123,11 @@ _PASSWORD = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='padding', name="padding",
full_name='spotify.login5.v3.credentials.Password.padding', full_name="spotify.login5.v3.credentials.Password.padding",
index=2, index=2,
number=3, number=3,
type=12, type=12,
@ -137,14 +142,15 @@ _PASSWORD = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=134, serialized_start=134,
@ -152,23 +158,23 @@ _PASSWORD = _descriptor.Descriptor(
) )
_FACEBOOKACCESSTOKEN = _descriptor.Descriptor( _FACEBOOKACCESSTOKEN = _descriptor.Descriptor(
name='FacebookAccessToken', name="FacebookAccessToken",
full_name='spotify.login5.v3.credentials.FacebookAccessToken', full_name="spotify.login5.v3.credentials.FacebookAccessToken",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='fb_uid', name="fb_uid",
full_name='spotify.login5.v3.credentials.FacebookAccessToken.fb_uid', full_name="spotify.login5.v3.credentials.FacebookAccessToken.fb_uid",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -176,17 +182,18 @@ _FACEBOOKACCESSTOKEN = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='access_token', name="access_token",
full_name='spotify.login5.v3.credentials.FacebookAccessToken.access_token', full_name="spotify.login5.v3.credentials.FacebookAccessToken.access_token",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -194,14 +201,15 @@ _FACEBOOKACCESSTOKEN = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=193, serialized_start=193,
@ -209,23 +217,23 @@ _FACEBOOKACCESSTOKEN = _descriptor.Descriptor(
) )
_ONETIMETOKEN = _descriptor.Descriptor( _ONETIMETOKEN = _descriptor.Descriptor(
name='OneTimeToken', name="OneTimeToken",
full_name='spotify.login5.v3.credentials.OneTimeToken', full_name="spotify.login5.v3.credentials.OneTimeToken",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='token', name="token",
full_name='spotify.login5.v3.credentials.OneTimeToken.token', full_name="spotify.login5.v3.credentials.OneTimeToken.token",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -233,14 +241,15 @@ _ONETIMETOKEN = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=254, serialized_start=254,
@ -248,23 +257,23 @@ _ONETIMETOKEN = _descriptor.Descriptor(
) )
_PARENTCHILDCREDENTIAL = _descriptor.Descriptor( _PARENTCHILDCREDENTIAL = _descriptor.Descriptor(
name='ParentChildCredential', name="ParentChildCredential",
full_name='spotify.login5.v3.credentials.ParentChildCredential', full_name="spotify.login5.v3.credentials.ParentChildCredential",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='child_id', name="child_id",
full_name='spotify.login5.v3.credentials.ParentChildCredential.child_id', full_name="spotify.login5.v3.credentials.ParentChildCredential.child_id",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -272,10 +281,11 @@ _PARENTCHILDCREDENTIAL = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='parent_stored_credential', name="parent_stored_credential",
full_name='spotify.login5.v3.credentials.ParentChildCredential.parent_stored_credential', full_name="spotify.login5.v3.credentials.ParentChildCredential.parent_stored_credential",
index=1, index=1,
number=2, number=2,
type=11, type=11,
@ -290,14 +300,15 @@ _PARENTCHILDCREDENTIAL = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=285, serialized_start=285,
@ -305,23 +316,23 @@ _PARENTCHILDCREDENTIAL = _descriptor.Descriptor(
) )
_APPLESIGNINCREDENTIAL = _descriptor.Descriptor( _APPLESIGNINCREDENTIAL = _descriptor.Descriptor(
name='AppleSignInCredential', name="AppleSignInCredential",
full_name='spotify.login5.v3.credentials.AppleSignInCredential', full_name="spotify.login5.v3.credentials.AppleSignInCredential",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='auth_code', name="auth_code",
full_name='spotify.login5.v3.credentials.AppleSignInCredential.auth_code', full_name="spotify.login5.v3.credentials.AppleSignInCredential.auth_code",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -329,17 +340,18 @@ _APPLESIGNINCREDENTIAL = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='redirect_uri', name="redirect_uri",
full_name='spotify.login5.v3.credentials.AppleSignInCredential.redirect_uri', full_name="spotify.login5.v3.credentials.AppleSignInCredential.redirect_uri",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -347,17 +359,18 @@ _APPLESIGNINCREDENTIAL = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='bundle_id', name="bundle_id",
full_name='spotify.login5.v3.credentials.AppleSignInCredential.bundle_id', full_name="spotify.login5.v3.credentials.AppleSignInCredential.bundle_id",
index=2, index=2,
number=3, number=3,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -365,14 +378,15 @@ _APPLESIGNINCREDENTIAL = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=411, serialized_start=411,
@ -380,75 +394,80 @@ _APPLESIGNINCREDENTIAL = _descriptor.Descriptor(
) )
_PARENTCHILDCREDENTIAL.fields_by_name[ _PARENTCHILDCREDENTIAL.fields_by_name[
'parent_stored_credential'].message_type = _STOREDCREDENTIAL "parent_stored_credential"
DESCRIPTOR.message_types_by_name['StoredCredential'] = _STOREDCREDENTIAL ].message_type = _STOREDCREDENTIAL
DESCRIPTOR.message_types_by_name['Password'] = _PASSWORD DESCRIPTOR.message_types_by_name["StoredCredential"] = _STOREDCREDENTIAL
DESCRIPTOR.message_types_by_name['FacebookAccessToken'] = _FACEBOOKACCESSTOKEN DESCRIPTOR.message_types_by_name["Password"] = _PASSWORD
DESCRIPTOR.message_types_by_name['OneTimeToken'] = _ONETIMETOKEN DESCRIPTOR.message_types_by_name["FacebookAccessToken"] = _FACEBOOKACCESSTOKEN
DESCRIPTOR.message_types_by_name[ DESCRIPTOR.message_types_by_name["OneTimeToken"] = _ONETIMETOKEN
'ParentChildCredential'] = _PARENTCHILDCREDENTIAL DESCRIPTOR.message_types_by_name["ParentChildCredential"] = _PARENTCHILDCREDENTIAL
DESCRIPTOR.message_types_by_name[ DESCRIPTOR.message_types_by_name["AppleSignInCredential"] = _APPLESIGNINCREDENTIAL
'AppleSignInCredential'] = _APPLESIGNINCREDENTIAL
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
StoredCredential = _reflection.GeneratedProtocolMessageType( StoredCredential = _reflection.GeneratedProtocolMessageType(
'StoredCredential', "StoredCredential",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _STOREDCREDENTIAL, "DESCRIPTOR": _STOREDCREDENTIAL,
'__module__': 'spotify.login5.v3.credentials.credentials_pb2' "__module__": "spotify.login5.v3.credentials.credentials_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.credentials.StoredCredential) # @@protoc_insertion_point(class_scope:spotify.login5.v3.credentials.StoredCredential)
}) },
)
_sym_db.RegisterMessage(StoredCredential) _sym_db.RegisterMessage(StoredCredential)
Password = _reflection.GeneratedProtocolMessageType( Password = _reflection.GeneratedProtocolMessageType(
'Password', "Password",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _PASSWORD, "DESCRIPTOR": _PASSWORD,
'__module__': 'spotify.login5.v3.credentials.credentials_pb2' "__module__": "spotify.login5.v3.credentials.credentials_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.credentials.Password) # @@protoc_insertion_point(class_scope:spotify.login5.v3.credentials.Password)
}) },
)
_sym_db.RegisterMessage(Password) _sym_db.RegisterMessage(Password)
FacebookAccessToken = _reflection.GeneratedProtocolMessageType( FacebookAccessToken = _reflection.GeneratedProtocolMessageType(
'FacebookAccessToken', "FacebookAccessToken",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _FACEBOOKACCESSTOKEN, "DESCRIPTOR": _FACEBOOKACCESSTOKEN,
'__module__': 'spotify.login5.v3.credentials.credentials_pb2' "__module__": "spotify.login5.v3.credentials.credentials_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.credentials.FacebookAccessToken) # @@protoc_insertion_point(class_scope:spotify.login5.v3.credentials.FacebookAccessToken)
}) },
)
_sym_db.RegisterMessage(FacebookAccessToken) _sym_db.RegisterMessage(FacebookAccessToken)
OneTimeToken = _reflection.GeneratedProtocolMessageType( OneTimeToken = _reflection.GeneratedProtocolMessageType(
'OneTimeToken', "OneTimeToken",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _ONETIMETOKEN, "DESCRIPTOR": _ONETIMETOKEN,
'__module__': 'spotify.login5.v3.credentials.credentials_pb2' "__module__": "spotify.login5.v3.credentials.credentials_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.credentials.OneTimeToken) # @@protoc_insertion_point(class_scope:spotify.login5.v3.credentials.OneTimeToken)
}) },
)
_sym_db.RegisterMessage(OneTimeToken) _sym_db.RegisterMessage(OneTimeToken)
ParentChildCredential = _reflection.GeneratedProtocolMessageType( ParentChildCredential = _reflection.GeneratedProtocolMessageType(
'ParentChildCredential', "ParentChildCredential",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _PARENTCHILDCREDENTIAL, "DESCRIPTOR": _PARENTCHILDCREDENTIAL,
'__module__': 'spotify.login5.v3.credentials.credentials_pb2' "__module__": "spotify.login5.v3.credentials.credentials_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.credentials.ParentChildCredential) # @@protoc_insertion_point(class_scope:spotify.login5.v3.credentials.ParentChildCredential)
}) },
)
_sym_db.RegisterMessage(ParentChildCredential) _sym_db.RegisterMessage(ParentChildCredential)
AppleSignInCredential = _reflection.GeneratedProtocolMessageType( AppleSignInCredential = _reflection.GeneratedProtocolMessageType(
'AppleSignInCredential', "AppleSignInCredential",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _APPLESIGNINCREDENTIAL, "DESCRIPTOR": _APPLESIGNINCREDENTIAL,
'__module__': 'spotify.login5.v3.credentials.credentials_pb2' "__module__": "spotify.login5.v3.credentials.credentials_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.credentials.AppleSignInCredential) # @@protoc_insertion_point(class_scope:spotify.login5.v3.credentials.AppleSignInCredential)
}) },
)
_sym_db.RegisterMessage(AppleSignInCredential) _sym_db.RegisterMessage(AppleSignInCredential)
DESCRIPTOR._options = None DESCRIPTOR._options = None

View File

@ -6,37 +6,38 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports) # @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default() _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='spotify/login5/v3/identifiers/identifiers.proto', name="spotify/login5/v3/identifiers/identifiers.proto",
package='spotify.login5.v3.identifiers', package="spotify.login5.v3.identifiers",
syntax='proto3', syntax="proto3",
serialized_options=b'\n\024com.spotify.login5v3', serialized_options=b"\n\024com.spotify.login5v3",
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
serialized_pb=b'\n/spotify/login5/v3/identifiers/identifiers.proto\x12\x1dspotify.login5.v3.identifiers\"U\n\x0bPhoneNumber\x12\x0e\n\x06number\x18\x01 \x01(\t\x12\x18\n\x10iso_country_code\x18\x02 \x01(\t\x12\x1c\n\x14\x63ountry_calling_code\x18\x03 \x01(\tB\x16\n\x14\x63om.spotify.login5v3b\x06proto3' serialized_pb=b'\n/spotify/login5/v3/identifiers/identifiers.proto\x12\x1dspotify.login5.v3.identifiers"U\n\x0bPhoneNumber\x12\x0e\n\x06number\x18\x01 \x01(\t\x12\x18\n\x10iso_country_code\x18\x02 \x01(\t\x12\x1c\n\x14\x63ountry_calling_code\x18\x03 \x01(\tB\x16\n\x14\x63om.spotify.login5v3b\x06proto3',
) )
_PHONENUMBER = _descriptor.Descriptor( _PHONENUMBER = _descriptor.Descriptor(
name='PhoneNumber', name="PhoneNumber",
full_name='spotify.login5.v3.identifiers.PhoneNumber', full_name="spotify.login5.v3.identifiers.PhoneNumber",
filename=None, filename=None,
file=DESCRIPTOR, file=DESCRIPTOR,
containing_type=None, containing_type=None,
create_key=_descriptor._internal_create_key, create_key=_descriptor._internal_create_key,
fields=[ fields=[
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='number', name="number",
full_name='spotify.login5.v3.identifiers.PhoneNumber.number', full_name="spotify.login5.v3.identifiers.PhoneNumber.number",
index=0, index=0,
number=1, number=1,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -44,17 +45,18 @@ _PHONENUMBER = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='iso_country_code', name="iso_country_code",
full_name='spotify.login5.v3.identifiers.PhoneNumber.iso_country_code', full_name="spotify.login5.v3.identifiers.PhoneNumber.iso_country_code",
index=1, index=1,
number=2, number=2,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -62,17 +64,18 @@ _PHONENUMBER = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='country_calling_code', name="country_calling_code",
full_name='spotify.login5.v3.identifiers.PhoneNumber.country_calling_code', full_name="spotify.login5.v3.identifiers.PhoneNumber.country_calling_code",
index=2, index=2,
number=3, number=3,
type=9, type=9,
cpp_type=9, cpp_type=9,
label=1, label=1,
has_default_value=False, has_default_value=False,
default_value=b"".decode('utf-8'), default_value=b"".decode("utf-8"),
message_type=None, message_type=None,
enum_type=None, enum_type=None,
containing_type=None, containing_type=None,
@ -80,31 +83,33 @@ _PHONENUMBER = _descriptor.Descriptor(
extension_scope=None, extension_scope=None,
serialized_options=None, serialized_options=None,
file=DESCRIPTOR, file=DESCRIPTOR,
create_key=_descriptor._internal_create_key), create_key=_descriptor._internal_create_key,
),
], ],
extensions=[], extensions=[],
nested_types=[], nested_types=[],
enum_types=[], enum_types=[],
serialized_options=None, serialized_options=None,
is_extendable=False, is_extendable=False,
syntax='proto3', syntax="proto3",
extension_ranges=[], extension_ranges=[],
oneofs=[], oneofs=[],
serialized_start=82, serialized_start=82,
serialized_end=167, serialized_end=167,
) )
DESCRIPTOR.message_types_by_name['PhoneNumber'] = _PHONENUMBER DESCRIPTOR.message_types_by_name["PhoneNumber"] = _PHONENUMBER
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
PhoneNumber = _reflection.GeneratedProtocolMessageType( PhoneNumber = _reflection.GeneratedProtocolMessageType(
'PhoneNumber', "PhoneNumber",
(_message.Message, ), (_message.Message,),
{ {
'DESCRIPTOR': _PHONENUMBER, "DESCRIPTOR": _PHONENUMBER,
'__module__': 'spotify.login5.v3.identifiers.identifiers_pb2' "__module__": "spotify.login5.v3.identifiers.identifiers_pb2"
# @@protoc_insertion_point(class_scope:spotify.login5.v3.identifiers.PhoneNumber) # @@protoc_insertion_point(class_scope:spotify.login5.v3.identifiers.PhoneNumber)
}) },
)
_sym_db.RegisterMessage(PhoneNumber) _sym_db.RegisterMessage(PhoneNumber)
DESCRIPTOR._options = None DESCRIPTOR._options = None

View File

@ -3,20 +3,16 @@ from librespot.standard.FilterInputStream import FilterInputStream
class DataInputStream(FilterInputStream, DataInput): class DataInputStream(FilterInputStream, DataInput):
def read(self, def read(self, b: bytearray = None, offset: int = None, length: int = None) -> int:
b: bytearray = None,
offset: int = None,
length: int = None) -> int:
if b is not None and offset is None and length is None: if b is not None and offset is None and length is None:
return self.input_stream.read(b, 0, len(b)) return self.input_stream.read(b, 0, len(b))
if b is not None and offset is not None and length is not None: if b is not None and offset is not None and length is not None:
return self.input_stream.read(b, offset, length) return self.input_stream.read(b, offset, length)
raise TypeError() raise TypeError()
def read_fully(self, def read_fully(
b: bytearray = None, self, b: bytearray = None, offset: int = None, length: int = None
offset: int = None, ) -> None:
length: int = None) -> None:
if b is not None and offset is None and length is None: if b is not None and offset is None and length is None:
offset = 0 offset = 0
length = len(b) length = len(b)
@ -94,14 +90,16 @@ class DataInputStream(FilterInputStream, DataInput):
def read_long(self) -> int: def read_long(self) -> int:
self.read_fully(self.read_buffer, 0, 8) self.read_fully(self.read_buffer, 0, 8)
return ((self.read_buffer[0] << 56) + return (
((self.read_buffer[1] & 255) << 48) + (self.read_buffer[0] << 56)
((self.read_buffer[2] & 255) << 40) + + ((self.read_buffer[1] & 255) << 48)
((self.read_buffer[3] & 255) << 32) + + ((self.read_buffer[2] & 255) << 40)
((self.read_buffer[4] & 255) << 24) + + ((self.read_buffer[3] & 255) << 32)
((self.read_buffer[5] & 255) << 16) + + ((self.read_buffer[4] & 255) << 24)
((self.read_buffer[6] & 255) << 8) + + ((self.read_buffer[5] & 255) << 16)
((self.read_buffer[7] & 255) << 0)) + ((self.read_buffer[6] & 255) << 8)
+ ((self.read_buffer[7] & 255) << 0)
)
def read_float(self) -> float: def read_float(self) -> float:
pass pass

View File

@ -45,7 +45,7 @@ class Packet:
def __set_flag(self, flag: int, on: bool): def __set_flag(self, flag: int, on: bool):
if on: if on:
self.__flags |= (1 << flag) self.__flags |= 1 << flag
else: else:
self.__flags &= ~(1 << flag) self.__flags &= ~(1 << flag)

View File

@ -3,13 +3,13 @@ from librespot.zeroconf import Packet
class Record: class Record:
TYPE_A: int = 0x01 TYPE_A: int = 0x01
TYPE_PTR: int = 0x0c TYPE_PTR: int = 0x0C
TYPE_CNAME: int = 0x05 TYPE_CNAME: int = 0x05
TYPE_TXT: int = 0x10 TYPE_TXT: int = 0x10
TYPE_AAAA: int = 0x1c TYPE_AAAA: int = 0x1C
TYPE_SRV: int = 0x21 TYPE_SRV: int = 0x21
TYPE_NSEC: int = 0x2f TYPE_NSEC: int = 0x2F
TYPE_ANY: int = 0xff TYPE_ANY: int = 0xFF
__type: int __type: int
_ttl: int _ttl: int
__name: str __name: str

View File

@ -15,7 +15,7 @@ class Service:
self.__alias = alias self.__alias = alias
for s in alias: for s in alias:
c = ord(s) c = ord(s)
if c < 0x20 or c == 0x7f: if c < 0x20 or c == 0x7F:
raise TypeError() raise TypeError()
self.__service = service self.__service = service
@ -27,7 +27,7 @@ class Service:
ns = "" ns = ""
for s in text: for s in text:
c = ord(s) c = ord(s)
if c == 0x2e or c == 0x5c: if c == 0x2E or c == 0x5C:
ns += "\\" ns += "\\"
ns += s ns += s
return ns return ns

View File

@ -16,11 +16,9 @@ class Zeroconf(Closeable):
def __init__(self): def __init__(self):
try: try:
self.__BROADCAST4 = socket.socket(socket.AF_INET, self.__BROADCAST4 = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
socket.SOCK_DGRAM)
self.__BROADCAST4.connect(("224.0.0.251", 5353)) self.__BROADCAST4.connect(("224.0.0.251", 5353))
self.__BROADCAST6 = socket.socket(socket.AF_INET6, self.__BROADCAST6 = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
socket.SOCK_DGRAM)
self.__BROADCAST6.connect(("FF02::FB", 5353)) self.__BROADCAST6.connect(("FF02::FB", 5353))
except Exception as e: except Exception as e:
pass pass
@ -31,9 +29,12 @@ class Zeroconf(Closeable):
def get_or_create_local_host_name() -> str: def get_or_create_local_host_name() -> str:
host = socket.gethostname() host = socket.gethostname()
if host == "localhost": if host == "localhost":
host = base64.b64encode( host = (
random.randint(-9223372036854775808, base64.b64encode(
9223372036854775807)).decode() + ".local" random.randint(-9223372036854775808, 9223372036854775807)
).decode()
+ ".local"
)
return host return host
def set_use_ipv4(self, ipv4: bool) -> Zeroconf: def set_use_ipv4(self, ipv4: bool) -> Zeroconf: