406 lines
12 KiB
Protocol Buffer
406 lines
12 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package ynison;
|
|
|
|
option go_package = "gitea.mrixs.me/Mrixs/yandex-music-api-go/internal/ynison/proto";
|
|
|
|
// DeviceType represents the type of device
|
|
enum DeviceType {
|
|
DEVICE_TYPE_UNSPECIFIED = 0;
|
|
DEVICE_TYPE_WEB = 1;
|
|
DEVICE_TYPE_ANDROID = 2;
|
|
DEVICE_TYPE_IOS = 3;
|
|
DEVICE_TYPE_SMART_SPEAKER = 4;
|
|
DEVICE_TYPE_WEB_TV = 5;
|
|
DEVICE_TYPE_ANDROID_TV = 6;
|
|
DEVICE_TYPE_APPLE_TV = 7;
|
|
DEVICE_TYPE_ANDROID_WEAR = 8;
|
|
DEVICE_TYPE_WEB_DESKTOP = 9;
|
|
}
|
|
|
|
// PlayablePlayableType represents the type of playable entity
|
|
enum PlayablePlayableType {
|
|
PLAYABLE_TYPE_UNSPECIFIED = 0;
|
|
PLAYABLE_TYPE_TRACK = 1;
|
|
PLAYABLE_TYPE_LOCAL_TRACK = 2;
|
|
PLAYABLE_TYPE_INFINITE = 3;
|
|
PLAYABLE_TYPE_VIDEO_CLIP = 4;
|
|
}
|
|
|
|
// VideoClipInfoRecommendationType represents how a video clip got into the queue
|
|
enum VideoClipInfoRecommendationType {
|
|
VIDEO_CLIP_RECOMMENDATION_UNSPECIFIED = 0;
|
|
VIDEO_CLIP_RECOMMENDATION_RECOMMENDED = 1;
|
|
VIDEO_CLIP_RECOMMENDATION_ON_DEMAND = 2;
|
|
VIDEO_CLIP_RECOMMENDATION_SEARCH = 3;
|
|
VIDEO_CLIP_RECOMMENDATION_ARTIST = 4;
|
|
VIDEO_CLIP_RECOMMENDATION_OWN = 5;
|
|
VIDEO_CLIP_RECOMMENDATION_EDITORIAL_CHOICE = 6;
|
|
}
|
|
|
|
// PlayerQueueEntityType represents the type of entity the queue originated from
|
|
enum PlayerQueueEntityType {
|
|
ENTITY_TYPE_UNSPECIFIED = 0;
|
|
ENTITY_TYPE_ARTIST = 1;
|
|
ENTITY_TYPE_PLAYLIST = 2;
|
|
ENTITY_TYPE_ALBUM = 3;
|
|
ENTITY_TYPE_RADIO = 4;
|
|
ENTITY_TYPE_VARIOUS = 5;
|
|
ENTITY_TYPE_GENERATIVE = 6;
|
|
ENTITY_TYPE_FM_RADIO = 7;
|
|
ENTITY_TYPE_VIDEO_WAVE = 8;
|
|
ENTITY_TYPE_LOCAL_TRACKS = 9;
|
|
}
|
|
|
|
// PlayerQueueEntityContext represents the playback context
|
|
enum PlayerQueueEntityContext {
|
|
ENTITY_CONTEXT_UNSPECIFIED = 0;
|
|
ENTITY_CONTEXT_BASED_ON_ENTITY_BY_DEFAULT = 1;
|
|
ENTITY_CONTEXT_USER_TRACKS = 2;
|
|
ENTITY_CONTEXT_DOWNLOADED_TRACKS = 3;
|
|
ENTITY_CONTEXT_SEARCH = 4;
|
|
ENTITY_CONTEXT_MUSIC_HISTORY = 5;
|
|
ENTITY_CONTEXT_MUSIC_HISTORY_SEARCH = 6;
|
|
ENTITY_CONTEXT_ARTIST_MY_COLLECTION = 7;
|
|
ENTITY_CONTEXT_ARTIST_FAMILIAR_FROM_WAVE = 8;
|
|
}
|
|
|
|
// WaveSourceSourceType represents how a track got into the wave queue
|
|
enum WaveSourceSourceType {
|
|
WAVE_SOURCE_ONLINE_BY_DEFAULT = 0;
|
|
WAVE_SOURCE_OFFLINE = 1;
|
|
}
|
|
|
|
// PlayerStateOptionsRepeatMode represents the repeat mode
|
|
enum PlayerStateOptionsRepeatMode {
|
|
REPEAT_MODE_UNSPECIFIED = 0;
|
|
REPEAT_MODE_NONE = 1;
|
|
REPEAT_MODE_ONE = 2;
|
|
REPEAT_MODE_ALL = 3;
|
|
}
|
|
|
|
// PlayerQueueInjectPlayablePlayableType represents injectable playable type
|
|
enum PlayerQueueInjectPlayablePlayableType {
|
|
INJECT_PLAYABLE_TYPE_UNSPECIFIED = 0;
|
|
INJECT_PLAYABLE_TYPE_ALICE_SHOT = 1;
|
|
INJECT_PLAYABLE_TYPE_AD = 2;
|
|
INJECT_PLAYABLE_TYPE_PREROLL = 3;
|
|
}
|
|
|
|
// PutYnisonStateRequestActivityInterceptionType represents activity interception type
|
|
enum PutYnisonStateRequestActivityInterceptionType {
|
|
INTERCEPTION_DO_NOT_INTERCEPT_BY_DEFAULT = 0;
|
|
INTERCEPTION_INTERCEPT_IF_NO_ONE_ACTIVE = 1;
|
|
INTERCEPTION_INTERCEPT_EAGER = 2;
|
|
}
|
|
|
|
// Playable represents a playable entity (track, video clip, etc.)
|
|
message Playable {
|
|
string playable_id = 1;
|
|
string album_id_optional = 2;
|
|
PlayablePlayableType playable_type = 3;
|
|
string from = 4;
|
|
string title = 5;
|
|
string cover_url_optional = 6;
|
|
VideoClipInfo video_clip_info = 7;
|
|
TrackInfo track_info = 8;
|
|
string navigation_id_optional = 9;
|
|
string playback_action_id_optional = 10;
|
|
}
|
|
|
|
// VideoClipInfo represents additional info about a video clip
|
|
message VideoClipInfo {
|
|
VideoClipInfoRecommendationType recommendation_type = 1;
|
|
}
|
|
|
|
// TrackInfo represents additional info about a track
|
|
message TrackInfo {
|
|
uint32 track_source_key = 1;
|
|
string batch_id_optional = 2;
|
|
}
|
|
|
|
// UpdateVersion represents a version of changes
|
|
message UpdateVersion {
|
|
string device_id = 1;
|
|
int64 version = 2;
|
|
int64 timestamp_ms = 3;
|
|
}
|
|
|
|
// PlayerQueue represents a playback queue
|
|
message PlayerQueue {
|
|
string entity_id = 1;
|
|
PlayerQueueEntityType entity_type = 2;
|
|
PlayerQueueQueue queue = 12;
|
|
int32 current_playable_index = 3;
|
|
repeated Playable playable_list = 4;
|
|
PlayerStateOptions options = 5;
|
|
UpdateVersion version = 6;
|
|
Shuffle shuffle_optional = 7;
|
|
PlayerQueueEntityContext entity_context = 8;
|
|
string from_optional = 9;
|
|
PlayerQueueInitialEntity initial_entity_optional = 10;
|
|
PlayerQueuePlayerQueueOptions adding_options_optional = 11;
|
|
string navigation_id_optional = 13;
|
|
string filter_optional = 14;
|
|
string playback_action_id_optional = 15;
|
|
}
|
|
|
|
// PlayerQueueQueue represents hierarchical queue structure
|
|
message PlayerQueueQueue {
|
|
PlayerQueueQueueWaveQueue wave_queue = 1;
|
|
PlayerQueueQueueGenerativeQueue generative_queue = 2;
|
|
PlayerQueueQueueFmRadioQueue fm_radio_queue = 3;
|
|
PlayerQueueQueueVideoWaveQueue video_wave_queue = 4;
|
|
PlayerQueueQueueLocalTracksQueue local_tracks_queue = 5;
|
|
}
|
|
|
|
// PlayerQueueQueueWaveQueue represents a wave queue
|
|
message PlayerQueueQueueWaveQueue {
|
|
repeated Playable recommended_playable_list = 1;
|
|
int32 live_playable_index = 2;
|
|
PlayerQueueQueueWaveQueueEntityOptions entity_options = 3;
|
|
string navigation_id_optional = 4;
|
|
string playback_action_id_optional = 5;
|
|
}
|
|
|
|
// PlayerQueueQueueWaveQueueEntityOptions represents wave queue entity options
|
|
message PlayerQueueQueueWaveQueueEntityOptions {
|
|
PlayerQueueQueueWaveQueueEntityOptionsWaveSession wave_entity_optional = 1;
|
|
repeated PlayerQueueQueueWaveQueueEntityOptionsTrackSourceWithKey track_sources = 2;
|
|
}
|
|
|
|
// PlayerQueueQueueWaveQueueEntityOptionsWaveSession represents a wave session
|
|
message PlayerQueueQueueWaveQueueEntityOptionsWaveSession {
|
|
string session_id = 1;
|
|
}
|
|
|
|
// PlayerQueueQueueWaveQueueEntityOptionsTrackSourceWithKey represents a track source with key
|
|
message PlayerQueueQueueWaveQueueEntityOptionsTrackSourceWithKey {
|
|
uint32 key = 1;
|
|
PlayerQueueQueueWaveQueueEntityOptionsWaveSource wave_source = 2;
|
|
PlayerQueueQueueWaveQueueEntityOptionsPhonotekaSource phonoteka_source = 3;
|
|
}
|
|
|
|
// PlayerQueueQueueWaveQueueEntityOptionsWaveSource represents a wave source
|
|
message PlayerQueueQueueWaveQueueEntityOptionsWaveSource {
|
|
WaveSourceSourceType source_type = 1;
|
|
}
|
|
|
|
// PlayerQueueQueueWaveQueueEntityOptionsPhonotekaSource represents a phonoteka source
|
|
message PlayerQueueQueueWaveQueueEntityOptionsPhonotekaSource {
|
|
PlayerQueueEntityContext entity_context = 1;
|
|
PlayerQueueQueueWaveQueueEntityOptionsArtistId artist_id = 2;
|
|
PlayerQueueQueueWaveQueueEntityOptionsPlaylistId playlist_id = 3;
|
|
PlayerQueueQueueWaveQueueEntityOptionsAlbumId album_id = 4;
|
|
}
|
|
|
|
// PlayerQueueQueueWaveQueueEntityOptionsArtistId represents artist ID
|
|
message PlayerQueueQueueWaveQueueEntityOptionsArtistId {
|
|
string id = 1;
|
|
}
|
|
|
|
// PlayerQueueQueueWaveQueueEntityOptionsPlaylistId represents playlist ID
|
|
message PlayerQueueQueueWaveQueueEntityOptionsPlaylistId {
|
|
string id = 1;
|
|
string filter_optional = 2;
|
|
}
|
|
|
|
// PlayerQueueQueueWaveQueueEntityOptionsAlbumId represents album ID
|
|
message PlayerQueueQueueWaveQueueEntityOptionsAlbumId {
|
|
string id = 1;
|
|
}
|
|
|
|
// PlayerQueueQueueGenerativeQueue represents a generative queue
|
|
message PlayerQueueQueueGenerativeQueue {
|
|
string id = 1;
|
|
}
|
|
|
|
// PlayerQueueQueueFmRadioQueue represents an FM radio queue
|
|
message PlayerQueueQueueFmRadioQueue {
|
|
string id = 1;
|
|
}
|
|
|
|
// PlayerQueueQueueVideoWaveQueue represents a video wave queue
|
|
message PlayerQueueQueueVideoWaveQueue {
|
|
string id = 1;
|
|
}
|
|
|
|
// PlayerQueueQueueLocalTracksQueue represents a local tracks queue
|
|
message PlayerQueueQueueLocalTracksQueue {}
|
|
|
|
// PlayerQueueInitialEntity represents initial queue entity (deprecated)
|
|
message PlayerQueueInitialEntity {
|
|
string entity_id = 1;
|
|
PlayerQueueEntityType entity_type = 2;
|
|
}
|
|
|
|
// PlayerQueuePlayerQueueOptions represents queue options (deprecated)
|
|
message PlayerQueuePlayerQueueOptions {
|
|
PlayerQueuePlayerQueueOptionsRadioOptions radio_options = 1;
|
|
}
|
|
|
|
// PlayerQueuePlayerQueueOptionsRadioOptions represents radio options
|
|
message PlayerQueuePlayerQueueOptionsRadioOptions {
|
|
string session_id = 1;
|
|
}
|
|
|
|
// PlayerStateOptions represents player state options
|
|
message PlayerStateOptions {
|
|
PlayerStateOptionsRepeatMode repeat_mode = 1;
|
|
}
|
|
|
|
// Shuffle represents shuffle settings
|
|
message Shuffle {
|
|
repeated uint32 playable_indices = 1;
|
|
}
|
|
|
|
// Device represents a device
|
|
message Device {
|
|
DeviceInfo info = 1;
|
|
double volume = 2;
|
|
DeviceCapabilities capabilities = 3;
|
|
Session session = 4;
|
|
bool is_offline = 5;
|
|
DeviceVolume volume_info = 6;
|
|
}
|
|
|
|
// DeviceVolume represents device volume state
|
|
message DeviceVolume {
|
|
double volume = 1;
|
|
UpdateVersion version = 2;
|
|
}
|
|
|
|
// DeviceInfo represents device information
|
|
message DeviceInfo {
|
|
string device_id = 1;
|
|
string title = 2;
|
|
DeviceType type = 3;
|
|
string app_name = 4;
|
|
string app_version = 5;
|
|
}
|
|
|
|
// DeviceCapabilities represents device capabilities
|
|
message DeviceCapabilities {
|
|
bool can_be_player = 1;
|
|
bool can_be_remote_controller = 2;
|
|
uint32 volume_granularity = 3;
|
|
}
|
|
|
|
// Session represents a device session
|
|
message Session {
|
|
int64 id = 1;
|
|
}
|
|
|
|
// PlayingStatus represents playback status
|
|
message PlayingStatus {
|
|
int64 progress_ms = 1;
|
|
int64 duration_ms = 2;
|
|
bool paused = 3;
|
|
double playback_speed = 4;
|
|
UpdateVersion version = 5;
|
|
}
|
|
|
|
// PlayerQueueInject represents injected queue entity state
|
|
message PlayerQueueInject {
|
|
PlayingStatus playing_status = 1;
|
|
PlayerQueueInjectPlayable playable = 2;
|
|
UpdateVersion version = 3;
|
|
}
|
|
|
|
// PlayerQueueInjectPlayable represents an injectable playable
|
|
message PlayerQueueInjectPlayable {
|
|
string playable_id = 1;
|
|
PlayerQueueInjectPlayablePlayableType playable_type = 2;
|
|
string title = 3;
|
|
string cover_url = 4;
|
|
}
|
|
|
|
// PlayerState represents player state
|
|
message PlayerState {
|
|
PlayingStatus status = 1;
|
|
PlayerQueue player_queue = 2;
|
|
PlayerQueueInject player_queue_inject_optional = 3;
|
|
}
|
|
|
|
// PutYnisonStateRequest represents a state update request
|
|
message PutYnisonStateRequest {
|
|
UpdateFullState update_full_state = 1;
|
|
UpdateActiveDevice update_active_device = 2;
|
|
UpdatePlayingStatus update_playing_status = 3;
|
|
UpdatePlayerState update_player_state = 4;
|
|
UpdateVolume update_volume = 5;
|
|
UpdatePlayerQueueInject update_player_queue_inject = 6;
|
|
UpdateSessionParams update_session_params = 9;
|
|
UpdateVolumeInfo update_volume_info = 11;
|
|
SyncStateFromEOV sync_state_from_eov = 12;
|
|
int64 player_action_timestamp_ms = 7;
|
|
string rid = 8;
|
|
PutYnisonStateRequestActivityInterceptionType activity_interception_type = 10;
|
|
}
|
|
|
|
// PutYnisonStateResponse represents a state update response
|
|
message PutYnisonStateResponse {
|
|
PlayerState player_state = 1;
|
|
repeated Device devices = 2;
|
|
string active_device_id_optional = 3;
|
|
int64 timestamp_ms = 4;
|
|
string rid = 5;
|
|
}
|
|
|
|
// UpdatePlayerQueueInject represents player queue inject update
|
|
message UpdatePlayerQueueInject {
|
|
PlayerQueueInject player_queue_inject = 1;
|
|
}
|
|
|
|
// UpdateActiveDevice represents active device update
|
|
message UpdateActiveDevice {
|
|
string device_id_optional = 1;
|
|
}
|
|
|
|
// UpdatePlayingStatus represents playing status update
|
|
message UpdatePlayingStatus {
|
|
PlayingStatus playing_status = 1;
|
|
}
|
|
|
|
// UpdateVolume represents volume update (deprecated)
|
|
message UpdateVolume {
|
|
double volume = 1;
|
|
string device_id = 2;
|
|
}
|
|
|
|
// UpdateVolumeInfo represents volume info update
|
|
message UpdateVolumeInfo {
|
|
string device_id = 1;
|
|
DeviceVolume volume_info = 2;
|
|
}
|
|
|
|
// UpdatePlayerState represents player state update
|
|
message UpdatePlayerState {
|
|
PlayerState player_state = 1;
|
|
}
|
|
|
|
// UpdateFullState represents full state update
|
|
message UpdateFullState {
|
|
PlayerState player_state = 1;
|
|
bool is_currently_active = 2;
|
|
UpdateDevice device = 3;
|
|
SyncStateFromEOV sync_state_from_eov_optional = 4;
|
|
}
|
|
|
|
// UpdateSessionParams represents session params update
|
|
message UpdateSessionParams {
|
|
bool mute_events_if_passive = 1;
|
|
}
|
|
|
|
// UpdateDevice represents device update
|
|
message UpdateDevice {
|
|
DeviceInfo info = 1;
|
|
double volume = 2;
|
|
DeviceCapabilities capabilities = 3;
|
|
DeviceVolume volume_info = 4;
|
|
}
|
|
|
|
// SyncStateFromEOV represents sync state from EOV request
|
|
message SyncStateFromEOV {
|
|
string actual_queue_id = 1;
|
|
} |