metadata.proto 3.9 KB

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