metadata.proto 6.6 KB

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