librespot/protocol/proto/metadata.proto

267 lines
6.6 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto2";
2015-04-25 20:32:07 +00:00
message TopTracks {
2015-07-01 17:49:03 +00:00
optional string country = 0x1;
repeated Track track = 0x2;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
2015-04-25 20:32:07 +00:00
message ActivityPeriod {
2015-07-01 17:49:03 +00:00
optional sint32 start_year = 0x1;
optional sint32 end_year = 0x2;
optional sint32 decade = 0x3;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
2015-04-25 20:32:07 +00:00
message Artist {
2015-07-01 17:49:03 +00:00
optional bytes gid = 0x1;
optional string name = 0x2;
optional sint32 popularity = 0x3;
repeated TopTracks top_track = 0x4;
repeated AlbumGroup album_group = 0x5;
repeated AlbumGroup single_group = 0x6;
repeated AlbumGroup compilation_group = 0x7;
repeated AlbumGroup appears_on_group = 0x8;
repeated string genre = 0x9;
repeated ExternalId external_id = 0xa;
repeated Image portrait = 0xb;
repeated Biography biography = 0xc;
repeated ActivityPeriod activity_period = 0xd;
repeated Restriction restriction = 0xe;
repeated Artist related = 0xf;
optional bool is_portrait_album_cover = 0x10;
optional ImageGroup portrait_group = 0x11;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
2015-04-25 20:32:07 +00:00
message AlbumGroup {
2015-07-01 17:49:03 +00:00
repeated Album album = 0x1;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
2015-04-25 20:32:07 +00:00
message Date {
2015-07-01 17:49:03 +00:00
optional sint32 year = 0x1;
optional sint32 month = 0x2;
optional sint32 day = 0x3;
2019-10-08 17:20:18 +00:00
optional sint32 hour = 0x4;
optional sint32 minute = 0x5;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
2015-04-25 20:32:07 +00:00
message Album {
2015-07-01 17:49:03 +00:00
optional bytes gid = 0x1;
optional string name = 0x2;
repeated Artist artist = 0x3;
optional Type typ = 0x4;
2015-04-25 20:32:07 +00:00
enum Type {
2015-07-01 17:49:03 +00:00
ALBUM = 0x1;
SINGLE = 0x2;
COMPILATION = 0x3;
EP = 0x4;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
optional string label = 0x5;
optional Date date = 0x6;
optional sint32 popularity = 0x7;
repeated string genre = 0x8;
repeated Image cover = 0x9;
repeated ExternalId external_id = 0xa;
repeated Disc disc = 0xb;
repeated string review = 0xc;
repeated Copyright copyright = 0xd;
repeated Restriction restriction = 0xe;
repeated Album related = 0xf;
repeated SalePeriod sale_period = 0x10;
optional ImageGroup cover_group = 0x11;
2015-04-25 20:32:07 +00:00
}
message Track {
2015-07-01 17:49:03 +00:00
optional bytes gid = 0x1;
optional string name = 0x2;
optional Album album = 0x3;
repeated Artist artist = 0x4;
optional sint32 number = 0x5;
optional sint32 disc_number = 0x6;
optional sint32 duration = 0x7;
optional sint32 popularity = 0x8;
optional bool explicit = 0x9;
repeated ExternalId external_id = 0xa;
repeated Restriction restriction = 0xb;
repeated AudioFile file = 0xc;
repeated Track alternative = 0xd;
repeated SalePeriod sale_period = 0xe;
repeated AudioFile preview = 0xf;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
2015-04-25 20:32:07 +00:00
message Image {
2015-07-01 17:49:03 +00:00
optional bytes file_id = 0x1;
optional Size size = 0x2;
2015-04-25 20:32:07 +00:00
enum Size {
2015-07-01 17:49:03 +00:00
DEFAULT = 0x0;
SMALL = 0x1;
LARGE = 0x2;
XLARGE = 0x3;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
optional sint32 width = 0x3;
optional sint32 height = 0x4;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
2015-04-25 20:32:07 +00:00
message ImageGroup {
2015-07-01 17:49:03 +00:00
repeated Image image = 0x1;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
2015-04-25 20:32:07 +00:00
message Biography {
2015-07-01 17:49:03 +00:00
optional string text = 0x1;
repeated Image portrait = 0x2;
repeated ImageGroup portrait_group = 0x3;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
2015-04-25 20:32:07 +00:00
message Disc {
2015-07-01 17:49:03 +00:00
optional sint32 number = 0x1;
optional string name = 0x2;
repeated Track track = 0x3;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
2015-04-25 20:32:07 +00:00
message Copyright {
optional Type typ = 0x1;
2015-04-25 20:32:07 +00:00
enum Type {
2015-07-01 17:49:03 +00:00
P = 0x0;
C = 0x1;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
optional string text = 0x2;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
2015-04-25 20:32:07 +00:00
message Restriction {
2019-10-08 17:20:18 +00:00
enum Catalogue {
AD = 0;
SUBSCRIPTION = 1;
CATALOGUE_ALL = 2;
SHUFFLE = 3;
COMMERCIAL = 4;
}
2015-04-25 20:32:07 +00:00
enum Type {
2015-07-01 17:49:03 +00:00
STREAMING = 0x0;
2015-04-25 20:32:07 +00:00
}
2019-10-08 17:20:18 +00:00
repeated Catalogue catalogue = 0x1;
optional string countries_allowed = 0x2;
optional string countries_forbidden = 0x3;
optional Type typ = 0x4;
2015-07-01 17:49:03 +00:00
repeated string catalogue_str = 0x5;
2015-04-25 20:32:07 +00:00
}
2019-10-08 17:20:18 +00:00
message Availability {
repeated string catalogue_str = 0x1;
optional Date start = 0x2;
}
2015-04-25 20:32:07 +00:00
message SalePeriod {
2015-07-01 17:49:03 +00:00
repeated Restriction restriction = 0x1;
optional Date start = 0x2;
optional Date end = 0x3;
2015-04-25 20:32:07 +00:00
}
message ExternalId {
optional string typ = 0x1;
2015-07-01 17:49:03 +00:00
optional string id = 0x2;
2015-04-25 20:32:07 +00:00
}
message AudioFile {
2015-07-01 17:49:03 +00:00
optional bytes file_id = 0x1;
optional Format format = 0x2;
2015-04-25 20:32:07 +00:00
enum Format {
2015-07-01 17:49:03 +00:00
OGG_VORBIS_96 = 0x0;
OGG_VORBIS_160 = 0x1;
OGG_VORBIS_320 = 0x2;
MP3_256 = 0x3;
MP3_320 = 0x4;
MP3_160 = 0x5;
MP3_96 = 0x6;
2016-05-03 09:04:54 +00:00
MP3_160_ENC = 0x7;
2019-10-08 17:20:18 +00:00
// v4
// AAC_24 = 0x8;
// AAC_48 = 0x9;
2018-09-28 18:10:22 +00:00
MP4_128_DUAL = 0x8;
2016-05-03 09:04:54 +00:00
OTHER3 = 0x9;
AAC_160 = 0xa;
AAC_320 = 0xb;
2018-09-28 18:10:22 +00:00
MP4_128 = 0xc;
OTHER5 = 0xd;
2015-04-25 20:32:07 +00:00
}
}
2015-07-01 17:49:03 +00:00
2019-10-08 17:20:18 +00:00
message VideoFile {
optional bytes file_id = 1;
2018-09-28 18:10:22 +00:00
}
2019-10-08 17:20:18 +00:00
// Podcast Protos
2018-09-28 18:10:22 +00:00
message Show {
2019-10-08 17:20:18 +00:00
enum MediaType {
MIXED = 0;
AUDIO = 1;
VIDEO = 2;
}
enum ConsumptionOrder {
SEQUENTIAL = 1;
EPISODIC = 2;
RECENT = 3;
}
enum PassthroughEnum {
UNKNOWN = 0;
NONE = 1;
ALLOWED = 2;
}
2018-09-28 18:10:22 +00:00
optional bytes gid = 0x1;
optional string name = 0x2;
optional string description = 0x40;
2019-10-08 17:20:18 +00:00
optional sint32 deprecated_popularity = 0x41;
2018-09-28 18:10:22 +00:00
optional string publisher = 0x42;
optional string language = 0x43;
optional bool explicit = 0x44;
optional ImageGroup covers = 0x45;
2019-10-08 17:20:18 +00:00
repeated Episode episode = 0x46;
repeated Copyright copyright = 0x47;
2018-09-28 18:10:22 +00:00
repeated Restriction restriction = 0x48;
2019-10-08 17:20:18 +00:00
repeated string keyword = 0x49;
2018-09-28 18:10:22 +00:00
optional MediaType media_type = 0x4A;
optional ConsumptionOrder consumption_order = 0x4B;
optional bool interpret_restriction_using_geoip = 0x4C;
2019-10-08 17:20:18 +00:00
repeated Availability availability = 0x4E;
2018-09-28 18:10:22 +00:00
optional string country_of_origin = 0x4F;
repeated Category categories = 0x50;
optional PassthroughEnum passthrough = 0x51;
}
message Episode {
optional bytes gid = 0x1;
optional string name = 0x2;
optional sint32 duration = 0x7;
optional sint32 popularity = 0x8;
repeated AudioFile file = 0xc;
optional string description = 0x40;
2019-10-08 17:20:18 +00:00
optional sint32 number = 0x41;
2018-09-28 18:10:22 +00:00
optional Date publish_time = 0x42;
2019-10-08 17:20:18 +00:00
optional sint32 deprecated_popularity = 0x43;
2018-09-28 18:10:22 +00:00
optional ImageGroup covers = 0x44;
optional string language = 0x45;
optional bool explicit = 0x46;
optional Show show = 0x47;
2019-10-08 17:20:18 +00:00
repeated VideoFile video = 0x48;
repeated VideoFile video_preview = 0x49;
repeated AudioFile audio_preview = 0x4A;
2018-09-28 18:10:22 +00:00
repeated Restriction restriction = 0x4B;
2019-10-08 17:20:18 +00:00
optional ImageGroup freeze_frame = 0x4C;
repeated string keyword = 0x4D;
// Order of these two flags might be wrong!
2018-09-28 18:10:22 +00:00
optional bool suppress_monetization = 0x4E;
2019-10-08 17:20:18 +00:00
optional bool interpret_restriction_using_geoip = 0x4F;
optional bool allow_background_playback = 0x51;
repeated Availability availability = 0x52;
2018-09-28 18:10:22 +00:00
optional string external_url = 0x53;
optional OriginalAudio original_audio = 0x54;
}
message Category {
optional string name = 0x1;
repeated Category subcategories = 0x2;
}
message OriginalAudio {
optional bytes uuid = 0x1;
}