metadata.proto 3.8 KB

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