1syntax = "proto2";
2
3message TopTracks {
4    optional string country = 0x1;
5    repeated Track track = 0x2;
6}
7
8message ActivityPeriod {
9    optional sint32 start_year = 0x1;
10    optional sint32 end_year = 0x2;
11    optional sint32 decade = 0x3;
12}
13
14message Artist {
15    optional bytes gid = 0x1;
16    optional string name = 0x2;
17    optional sint32 popularity = 0x3;
18    repeated TopTracks top_track = 0x4;
19    repeated AlbumGroup album_group = 0x5;
20    repeated AlbumGroup single_group = 0x6;
21    repeated AlbumGroup compilation_group = 0x7;
22    repeated AlbumGroup appears_on_group = 0x8;
23    repeated string genre = 0x9;
24    repeated ExternalId external_id = 0xa;
25    repeated Image portrait = 0xb;
26    repeated Biography biography = 0xc;
27    repeated ActivityPeriod activity_period = 0xd;
28    repeated Restriction restriction = 0xe;
29    repeated Artist related = 0xf;
30    optional bool is_portrait_album_cover = 0x10;
31    optional ImageGroup portrait_group = 0x11;
32}
33
34message AlbumGroup {
35    repeated Album album = 0x1;
36}
37
38message Date {
39    optional sint32 year = 0x1;
40    optional sint32 month = 0x2;
41    optional sint32 day = 0x3;
42    optional sint32 hour = 0x4;
43    optional sint32 minute = 0x5;
44}
45
46message Album {
47    optional bytes gid = 0x1;
48    optional string name = 0x2;
49    repeated Artist artist = 0x3;
50    optional Type typ = 0x4;
51    enum Type {
52        ALBUM = 0x1;
53        SINGLE = 0x2;
54        COMPILATION = 0x3;
55        EP = 0x4;
56    }
57    optional string label = 0x5;
58    optional Date date = 0x6;
59    optional sint32 popularity = 0x7;
60    repeated string genre = 0x8;
61    repeated Image cover = 0x9;
62    repeated ExternalId external_id = 0xa;
63    repeated Disc disc = 0xb;
64    repeated string review = 0xc;
65    repeated Copyright copyright = 0xd;
66    repeated Restriction restriction = 0xe;
67    repeated Album related = 0xf;
68    repeated SalePeriod sale_period = 0x10;
69    optional ImageGroup cover_group = 0x11;
70}
71
72message Track {
73    optional bytes gid = 0x1;
74    optional string name = 0x2;
75    optional Album album = 0x3;
76    repeated Artist artist = 0x4;
77    optional sint32 number = 0x5;
78    optional sint32 disc_number = 0x6;
79    optional sint32 duration = 0x7;
80    optional sint32 popularity = 0x8;
81    optional bool explicit = 0x9;
82    repeated ExternalId external_id = 0xa;
83    repeated Restriction restriction = 0xb;
84    repeated AudioFile file = 0xc;
85    repeated Track alternative = 0xd;
86    repeated SalePeriod sale_period = 0xe;
87    repeated AudioFile preview = 0xf;
88}
89
90message Image {
91    optional bytes file_id = 0x1;
92    optional Size size = 0x2;
93    enum Size {
94        DEFAULT = 0x0;
95        SMALL = 0x1;
96        LARGE = 0x2;
97        XLARGE = 0x3;
98    }
99    optional sint32 width = 0x3;
100    optional sint32 height = 0x4;
101}
102
103message ImageGroup {
104    repeated Image image = 0x1;
105}
106
107message Biography {
108    optional string text = 0x1;
109    repeated Image portrait = 0x2;
110    repeated ImageGroup portrait_group = 0x3;
111}
112
113message Disc {
114    optional sint32 number = 0x1;
115    optional string name = 0x2;
116    repeated Track track = 0x3;
117}
118
119message Copyright {
120    optional Type typ = 0x1;
121    enum Type {
122        P = 0x0;
123        C = 0x1;
124    }
125    optional string text = 0x2;
126}
127
128message Restriction {
129    enum Catalogue {
130      AD = 0;
131      SUBSCRIPTION = 1;
132      CATALOGUE_ALL = 2;
133      SHUFFLE = 3;
134      COMMERCIAL = 4;
135    }
136    enum Type {
137        STREAMING = 0x0;
138    }
139    repeated Catalogue catalogue = 0x1;
140    optional string countries_allowed = 0x2;
141    optional string countries_forbidden = 0x3;
142    optional Type typ = 0x4;
143
144    repeated string catalogue_str = 0x5;
145}
146
147message Availability {
148	repeated string catalogue_str = 0x1;
149	optional Date start = 0x2;
150}
151
152message SalePeriod {
153    repeated Restriction restriction = 0x1;
154    optional Date start = 0x2;
155    optional Date end = 0x3;
156}
157
158message ExternalId {
159    optional string typ = 0x1;
160    optional string id = 0x2;
161}
162
163message AudioFile {
164    optional bytes file_id = 0x1;
165    optional Format format = 0x2;
166    enum Format {
167        OGG_VORBIS_96 = 0x0;
168        OGG_VORBIS_160 = 0x1;
169        OGG_VORBIS_320 = 0x2;
170        MP3_256 = 0x3;
171        MP3_320 = 0x4;
172        MP3_160 = 0x5;
173        MP3_96 = 0x6;
174        MP3_160_ENC = 0x7;
175        // v4
176        // AAC_24 = 0x8;
177        // AAC_48 = 0x9;
178        MP4_128_DUAL = 0x8;
179        OTHER3 = 0x9;
180        AAC_160 = 0xa;
181        AAC_320 = 0xb;
182        MP4_128 = 0xc;
183        OTHER5 = 0xd;
184    }
185}
186
187message VideoFile {
188	optional bytes file_id = 1;
189}
190
191// Podcast Protos
192message Show {
193  enum MediaType {
194      MIXED = 0;
195      AUDIO = 1;
196      VIDEO = 2;
197  }
198  enum ConsumptionOrder {
199      SEQUENTIAL = 1;
200      EPISODIC = 2;
201      RECENT = 3;
202    }
203  enum PassthroughEnum {
204      UNKNOWN = 0;
205      NONE = 1;
206      ALLOWED = 2;
207  }
208  optional bytes gid = 0x1;
209  optional string name = 0x2;
210  optional string description = 0x40;
211  optional sint32 deprecated_popularity = 0x41;
212  optional string publisher = 0x42;
213  optional string language = 0x43;
214  optional bool explicit = 0x44;
215  optional ImageGroup covers = 0x45;
216  repeated Episode episode = 0x46;
217  repeated Copyright copyright = 0x47;
218  repeated Restriction restriction = 0x48;
219  repeated string keyword = 0x49;
220  optional MediaType media_type = 0x4A;
221  optional ConsumptionOrder consumption_order = 0x4B;
222  optional bool interpret_restriction_using_geoip = 0x4C;
223  repeated Availability availability = 0x4E;
224  optional string country_of_origin = 0x4F;
225  repeated Category categories = 0x50;
226  optional PassthroughEnum passthrough = 0x51;
227}
228
229message Episode {
230  optional bytes gid = 0x1;
231  optional string name = 0x2;
232  optional sint32 duration = 0x7;
233  optional sint32 popularity = 0x8;
234  repeated AudioFile file = 0xc;
235  optional string description = 0x40;
236  optional sint32 number = 0x41;
237  optional Date publish_time = 0x42;
238  optional sint32 deprecated_popularity = 0x43;
239  optional ImageGroup covers = 0x44;
240  optional string language = 0x45;
241  optional bool explicit = 0x46;
242  optional Show show = 0x47;
243  repeated VideoFile video = 0x48;
244	repeated VideoFile video_preview = 0x49;
245  repeated AudioFile audio_preview = 0x4A;
246  repeated Restriction restriction = 0x4B;
247  optional ImageGroup freeze_frame = 0x4C;
248  repeated string keyword = 0x4D;
249  // Order of these two flags might be wrong!
250  optional bool suppress_monetization = 0x4E;
251  optional bool interpret_restriction_using_geoip = 0x4F;
252
253  optional bool allow_background_playback = 0x51;
254  repeated Availability availability = 0x52;
255  optional string external_url = 0x53;
256  optional OriginalAudio original_audio = 0x54;
257}
258
259message Category {
260  optional string name =  0x1;
261  repeated Category subcategories = 0x2;
262}
263
264message OriginalAudio {
265  optional bytes uuid = 0x1;
266}
267