metadata.proto 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. }
  38. message Album {
  39. optional bytes gid = 0x1;
  40. optional string name = 0x2;
  41. repeated Artist artist = 0x3;
  42. optional Type typ = 0x4;
  43. enum Type {
  44. ALBUM = 0x1;
  45. SINGLE = 0x2;
  46. COMPILATION = 0x3;
  47. EP = 0x4;
  48. }
  49. optional string label = 0x5;
  50. optional Date date = 0x6;
  51. optional sint32 popularity = 0x7;
  52. repeated string genre = 0x8;
  53. repeated Image cover = 0x9;
  54. repeated ExternalId external_id = 0xa;
  55. repeated Disc disc = 0xb;
  56. repeated string review = 0xc;
  57. repeated Copyright copyright = 0xd;
  58. repeated Restriction restriction = 0xe;
  59. repeated Album related = 0xf;
  60. repeated SalePeriod sale_period = 0x10;
  61. optional ImageGroup cover_group = 0x11;
  62. }
  63. message Track {
  64. optional bytes gid = 0x1;
  65. optional string name = 0x2;
  66. optional Album album = 0x3;
  67. repeated Artist artist = 0x4;
  68. optional sint32 number = 0x5;
  69. optional sint32 disc_number = 0x6;
  70. optional sint32 duration = 0x7;
  71. optional sint32 popularity = 0x8;
  72. optional bool explicit = 0x9;
  73. repeated ExternalId external_id = 0xa;
  74. repeated Restriction restriction = 0xb;
  75. repeated AudioFile file = 0xc;
  76. repeated Track alternative = 0xd;
  77. repeated SalePeriod sale_period = 0xe;
  78. repeated AudioFile preview = 0xf;
  79. }
  80. message Image {
  81. optional bytes file_id = 0x1;
  82. optional Size size = 0x2;
  83. enum Size {
  84. DEFAULT = 0x0;
  85. SMALL = 0x1;
  86. LARGE = 0x2;
  87. XLARGE = 0x3;
  88. }
  89. optional sint32 width = 0x3;
  90. optional sint32 height = 0x4;
  91. }
  92. message ImageGroup {
  93. repeated Image image = 0x1;
  94. }
  95. message Biography {
  96. optional string text = 0x1;
  97. repeated Image portrait = 0x2;
  98. repeated ImageGroup portrait_group = 0x3;
  99. }
  100. message Disc {
  101. optional sint32 number = 0x1;
  102. optional string name = 0x2;
  103. repeated Track track = 0x3;
  104. }
  105. message Copyright {
  106. optional Type typ = 0x1;
  107. enum Type {
  108. P = 0x0;
  109. C = 0x1;
  110. }
  111. optional string text = 0x2;
  112. }
  113. message Restriction {
  114. optional string countries_allowed = 0x2;
  115. optional string countries_forbidden = 0x3;
  116. optional Type typ = 0x4;
  117. enum Type {
  118. STREAMING = 0x0;
  119. }
  120. repeated string catalogue_str = 0x5;
  121. }
  122. message SalePeriod {
  123. repeated Restriction restriction = 0x1;
  124. optional Date start = 0x2;
  125. optional Date end = 0x3;
  126. }
  127. message ExternalId {
  128. optional string typ = 0x1;
  129. optional string id = 0x2;
  130. }
  131. message AudioFile {
  132. optional bytes file_id = 0x1;
  133. optional Format format = 0x2;
  134. enum Format {
  135. OGG_VORBIS_96 = 0x0;
  136. OGG_VORBIS_160 = 0x1;
  137. OGG_VORBIS_320 = 0x2;
  138. MP3_256 = 0x3;
  139. MP3_320 = 0x4;
  140. MP3_160 = 0x5;
  141. MP3_96 = 0x6;
  142. MP3_160_ENC = 0x7;
  143. OTHER2 = 0x8;
  144. OTHER3 = 0x9;
  145. AAC_160 = 0xa;
  146. AAC_320 = 0xb;
  147. OTHER4 = 0xc;
  148. OTHER5 = 0xd;
  149. }
  150. }