metadata.proto 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. message TopTracks {
  2. optional string country = 1;
  3. repeated Track track = 2;
  4. }
  5. message ActivityPeriod {
  6. optional sint32 start_year = 1;
  7. optional sint32 end_year = 2;
  8. optional sint32 decade = 3;
  9. }
  10. message Artist {
  11. optional bytes gid = 1;
  12. optional string name = 2;
  13. optional sint32 popularity = 3;
  14. repeated TopTracks top_track = 4;
  15. repeated AlbumGroup album_group = 5;
  16. repeated AlbumGroup single_group = 6;
  17. repeated AlbumGroup compilation_group = 7;
  18. repeated AlbumGroup appears_on_group = 8;
  19. repeated string genre = 9;
  20. repeated ExternalId external_id = 10;
  21. repeated Image portrait = 11;
  22. repeated Biography biography = 12;
  23. repeated ActivityPeriod activity_period = 13;
  24. repeated Restriction restriction = 14;
  25. repeated Artist related = 15;
  26. optional bool is_portrait_album_cover = 16;
  27. optional ImageGroup portrait_group = 17;
  28. }
  29. message AlbumGroup {
  30. repeated Album album = 1;
  31. }
  32. message Date {
  33. optional sint32 year = 1;
  34. optional sint32 month = 2;
  35. optional sint32 day = 3;
  36. }
  37. message Album {
  38. enum Type {
  39. ALBUM = 1;
  40. SINGLE = 2;
  41. COMPILATION = 3;
  42. }
  43. optional bytes gid = 1;
  44. optional string name = 2;
  45. repeated Artist artist = 3;
  46. optional Type type = 4;
  47. optional string label = 5;
  48. optional Date date = 6;
  49. optional sint32 popularity = 7;
  50. repeated string genre = 8;
  51. repeated Image cover = 9;
  52. repeated ExternalId external_id = 10;
  53. repeated Disc disc = 11;
  54. repeated string review = 12;
  55. repeated Copyright copyright = 13;
  56. repeated Restriction restriction = 14;
  57. repeated Album related = 15;
  58. repeated SalePeriod sale_period = 16;
  59. optional ImageGroup cover_group = 17;
  60. }
  61. message Track {
  62. optional bytes gid = 1;
  63. optional string name = 2;
  64. optional Album album = 3;
  65. repeated Artist artist = 4;
  66. optional sint32 number = 5;
  67. optional sint32 disc_number = 6;
  68. optional sint32 duration = 7;
  69. optional sint32 popularity = 8;
  70. optional bool explicit = 9;
  71. repeated ExternalId external_id = 10;
  72. repeated Restriction restriction = 11;
  73. repeated AudioFile file = 12;
  74. repeated Track alternative = 13;
  75. repeated SalePeriod sale_period = 14;
  76. repeated AudioFile preview = 15;
  77. }
  78. message Image {
  79. enum Size {
  80. DEFAULT = 0;
  81. SMALL = 1;
  82. LARGE = 2;
  83. XLARGE = 3;
  84. }
  85. optional bytes file_id = 1;
  86. optional Size size = 2;
  87. optional sint32 width = 3;
  88. optional sint32 height = 4;
  89. }
  90. message ImageGroup {
  91. repeated Image image = 1;
  92. }
  93. message Biography {
  94. optional string text = 1;
  95. repeated Image portrait = 2;
  96. repeated ImageGroup portrait_group = 3;
  97. }
  98. message Disc {
  99. optional sint32 number = 1;
  100. optional string name = 2;
  101. repeated Track track = 3;
  102. }
  103. message Copyright {
  104. enum Type {
  105. P = 0;
  106. C = 1;
  107. }
  108. optional Type type = 1;
  109. optional string text = 2;
  110. }
  111. message Restriction {
  112. enum Catalogue {
  113. FREE = 0;
  114. PREMIUM = 1;
  115. SHUFFLE = 3;
  116. COMMERCIAL = 4;
  117. }
  118. enum Type {
  119. STREAMING = 0;
  120. }
  121. repeated Catalogue catalogue = 1;
  122. optional string countries_allowed = 2;
  123. optional string countries_forbidden = 3;
  124. optional Type type = 4;
  125. repeated string usage = 5;
  126. }
  127. message SalePeriod {
  128. repeated Restriction restriction = 1;
  129. optional Date start = 2;
  130. optional Date end = 3;
  131. }
  132. message ExternalId {
  133. optional string type = 1;
  134. optional string id = 2;
  135. }
  136. message AudioFile {
  137. enum Format {
  138. OGG_VORBIS_96 = 0;
  139. OGG_VORBIS_160 = 1;
  140. OGG_VORBIS_320 = 2;
  141. MP3_256 = 3;
  142. MP3_320 = 4;
  143. MP3_160 = 5;
  144. MP3_96 = 6;
  145. OTHER1 = 7; // TODO
  146. OTHER2 = 8; // TODO
  147. }
  148. optional bytes gid = 1;
  149. optional Format format = 2;
  150. }