syntax = "proto2"; package networkremote; enum MsgType { UNKNOWN = 0; CONNECT = 1; DISCONNECT = 2; INFO = 3; KEEP_ALIVE = 4; GET_COLLECTION = 5; GET_PLAYLISTS = 6; GET_PLAYLIST_SONGS = 7; SEND_PLAYLISTS = 8; SEND_PLAYLIST_SONGS = 10; OPEN_PLAYLIST = 11; CLOSE_PLAYLIST = 12; UPDATE_PLAYLIST = 13; REMOVE_PLAYLIST_SONGS = 14; PLAYLIST_INSERT_URLS = 15; CHANGE_SONG = 21; SET_VOLUME = 22; SET_TRACK_POSITION = 23; GET_LYRICS = 24; DOWNLOAD_SONGS = 25; SONG_OFFER_RESPONSE = 26; SONG_OFFER_FILE_CHUNK = 27; CURRENT_METAINFO = 28; ENGINE_STATE_CHANGED = 29; UPDATE_TRACK_POSITION = 30; ACTIVE_PLAYLIST_CHANGED = 31; FIRST_DATA_SENT_COMPLETE = 32; LYRICS = 33; DOWNLOAD_QUEUE_EMPTY = 34; COLLECTION_CHUNK = 35; DOWNLOAD_TOTAL_SIZE = 36; TRANSCODING_FILES = 37; PLAYPAUSE = 101; PLAY = 102; PAUSE = 103; STOP = 104; STOP_AFTER = 105; NEXT = 106; PREVIOUS = 107; SHUFFLE_PLAYLIST = 108; REPEAT = 111; SHUFFLE = 112; LIST_FILES = 121; REQUEST_FILES = 122; APPEND_FILES = 123; LOVE = 131; RATE_SONG = 132; } enum EngineState { EngineState_Empty = 0; EngineState_Idle = 1; EngineState_Playing = 2; EngineState_Paused = 3; } message SongMetadata { enum Source { Source_Unknown = 0; Source_LocalFile = 1; Source_Collection = 2; Source_CDDA = 3; Source_Device = 4; Source_Stream = 5; Source_Tidal = 6; Source_Subsonic = 7; Source_Qobuz = 8; Source_SomaFM = 9; Source_RadioParadise = 10; Source_Spotify = 11; } enum FileType { FileType_Unknown = 0; FileType_WAV = 1; FileType_FLAC = 2; FileType_WavPack = 3; FileType_OggFlac = 4; FileType_OggVorbis = 5; FileType_OggOpus = 6; FileType_OggSpeex = 7; FileType_MPEG = 8; FileType_MP4 = 9; FileType_ASF = 10; FileType_AIFF = 11; FileType_MPC = 12; FileType_TrueAudio = 13; FileType_DSF = 14; FileType_DSDIFF = 15; FileType_PCM = 16; FileType_APE = 17; FileType_MOD = 18; FileType_S3M = 19; FileType_XM = 20; FileType_IT = 21; FileType_SPC = 22; FileType_VGM = 23; FileType_CDDA = 90; FileType_Stream = 91; } optional int32 song_id = 1; optional int32 index = 2; optional string title = 3; optional string album = 4; optional string artist = 5; optional string albumartist = 6; optional int32 track = 7; optional int32 disc = 8; optional string pretty_year = 9; optional string genre = 10; optional uint32 playcount = 11; optional string pretty_length = 12; optional bytes art = 13; optional int64 length = 14; optional bool is_local = 15; optional Source source = 22; optional FileType filetype = 23; optional string filename = 16; optional int64 file_size = 17; optional float rating = 18; optional string url = 19; optional string art_automatic = 20; optional string art_manual = 21; } message Playlist { optional int32 playlist_id = 1; optional string name = 2; optional int32 item_count = 3; optional bool active = 4; optional bool closed = 5; optional bool favorite = 6; } enum RepeatMode { RepeatMode_Off = 0; RepeatMode_Track = 1; RepeatMode_Album = 2; RepeatMode_Playlist = 3; RepeatMode_OneByOne = 4; RepeatMode_Intro = 5; } enum ShuffleMode { ShuffleMode_Off = 0; ShuffleMode_All = 1; ShuffleMode_InsideAlbum = 2; ShuffleMode_Albums = 3; } message RequestPlaylists { optional bool include_closed = 1; } message RequestPlaylistSongs { optional int32 playlist_id = 1; } message RequestChangeSong { optional int32 playlist_id = 1; optional int32 song_index = 2; } message RequestSetVolume { optional uint32 volume = 1; } message Repeat { optional RepeatMode repeat_mode = 1; } message Shuffle { optional ShuffleMode shuffle_mode = 1; } message ResponseInfo { optional string version = 1; optional EngineState state = 2; optional bool allow_downloads = 3; repeated string files_music_extensions = 4; } message ResponseCurrentMetadata { optional SongMetadata song_metadata = 1; } message ResponsePlaylists { repeated Playlist playlist = 1; optional bool include_closed = 2; } message ResponsePlaylistSongs { optional Playlist requested_playlist = 1; repeated SongMetadata songs = 2; } message ResponseEngineStateChanged { optional EngineState state = 1; } message ResponseUpdateTrackPosition { optional int32 position = 1; } message RequestConnect { optional int32 auth_code = 1; optional bool send_playlist_songs = 2; optional bool downloader = 3; } enum ReasonDisconnect { Server_Shutdown = 1; Wrong_Auth_Code = 2; Not_Authenticated = 3; Download_Forbidden = 4; } message ResponseDisconnect { optional ReasonDisconnect reason_disconnect = 1; } message ResponseActiveChanged { optional int32 playlist_id = 1; } message RequestSetTrackPosition { optional int32 position = 1; } message RequestInsertUrls { optional int32 playlist_id = 1; repeated string urls = 2; optional int32 position = 3 [default = -1]; optional bool play_now = 4 [default = false]; optional bool enqueue = 5 [default = false]; repeated SongMetadata songs = 6; optional string new_playlist_name = 7; } message RequestRemoveSongs { optional int32 playlist_id = 1; repeated int32 songs = 2; } message RequestOpenPlaylist { optional int32 playlist_id = 1; } message RequestClosePlaylist { optional int32 playlist_id = 1; } message RequestUpdatePlaylist { optional int32 playlist_id = 1; optional string new_playlist_name = 2; optional bool favorite = 3; optional bool create_new_playlist = 4; optional bool clear_playlist = 5; } message ResponseLyrics { repeated Lyric lyrics = 1; } message Lyric { optional string song_id = 1; optional string title = 2; optional string content = 3; } enum DownloadItem { CurrentItem = 1; ItemAlbum = 2; APlaylist = 3; Urls = 4; } message RequestDownloadSongs { optional DownloadItem download_item = 1; optional int32 playlist_id = 2; repeated string urls = 3; repeated int32 songs_ids = 4; optional string relative_path = 5; } message ResponseSongFileChunk { optional int32 chunk_number = 1; optional int32 chunk_count = 2; optional int32 file_number = 3; optional int32 file_count = 4; optional SongMetadata song_metadata = 6; optional bytes data = 7; optional int64 size = 8; optional bytes file_hash = 9; } message ResponseCollectionChunk { optional int32 chunk_number = 1; optional int32 chunk_count = 2; optional bytes data = 3; optional int64 size = 4; optional bytes file_hash = 5; } message ResponseSongOffer { optional bool accepted = 1; } message RequestRateSong { optional float rating = 1; } message ResponseDownloadTotalSize { optional int64 total_size = 1; optional int64 file_count = 2; } message ResponseTranscoderStatus { optional int32 processed = 1; optional int32 total = 2; } message RequestListFiles { optional string relative_path = 1; } message FileMetadata { optional string filename = 1; optional bool is_dir = 2; } message ResponseListFiles { enum Error { NONE = 0; ROOT_DIR_NOT_SET = 1; DIR_NOT_ACCESSIBLE = 2; DIR_NOT_EXIST = 3; UNKNOWN = 4; } optional string relative_path = 1; repeated FileMetadata files = 2; optional Error error = 3; } message RequestAppendFiles { optional int32 playlist_id = 1; optional string new_playlist_name = 2; optional string relative_path = 3; repeated string files = 4; optional bool play_now = 5; optional bool clear_first = 6; } message Stream { optional string name = 1; optional string url = 2; optional string url_logo = 3; } message Message { optional int32 version = 1 [default = 21]; optional MsgType type = 2 [default = UNKNOWN]; optional RequestConnect request_connect = 21; optional RequestPlaylists request_playlists = 27; optional RequestPlaylistSongs request_playlist_songs = 10; optional RequestChangeSong request_change_song = 11; optional RequestSetVolume request_set_volume = 12; optional RequestSetTrackPosition request_set_track_position = 23; optional RequestInsertUrls request_insert_urls = 25; optional RequestRemoveSongs request_remove_songs = 26; optional RequestOpenPlaylist request_open_playlist = 28; optional RequestClosePlaylist request_close_playlist = 29; optional RequestUpdatePlaylist request_update_playlist = 53; optional RequestDownloadSongs request_download_songs = 31; optional RequestRateSong request_rate_song = 35; optional RequestListFiles request_list_files = 50; optional RequestAppendFiles request_append_files = 51; optional Repeat repeat = 13; optional Shuffle shuffle = 14; optional ResponseInfo response_info = 15; optional ResponseCurrentMetadata response_current_metadata = 16; optional ResponsePlaylists response_playlists = 17; optional ResponsePlaylistSongs response_playlist_songs = 18; optional ResponseEngineStateChanged response_engine_state_changed = 19; optional ResponseUpdateTrackPosition response_update_track_position = 20; optional ResponseDisconnect response_disconnect = 22; optional ResponseActiveChanged response_active_changed = 24; optional ResponseLyrics response_lyrics = 30; optional ResponseSongFileChunk response_song_file_chunk = 32; optional ResponseSongOffer response_song_offer = 33; optional ResponseCollectionChunk response_collection_chunk = 34; optional ResponseDownloadTotalSize response_download_total_size = 36; optional ResponseTranscoderStatus response_transcoder_status = 39; optional ResponseListFiles response_list_files = 52; }