forked from simon-weber/google-music-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetadata.proto
89 lines (76 loc) · 2.24 KB
/
metadata.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
message Track {
optional string id = 2; //md5sum of the file, stripped of tags and base64 encoded
optional int32 creation = 3; //unix timestamp seconds - only a guess
optional int32 lastPlayed = 4; //this is likely to be incorrect, as the server will change this on a whim
optional string title = 6;
optional string artist = 7;
optional string composer = 8;
optional string album = 9;
optional string albumArtist = 10;
optional int32 year = 11;
optional string comment = 12;
optional int32 track = 13;
optional string genre = 14;
optional int32 duration = 15;
optional int32 beatsPerMinute = 16;
optional int32 playCount = 20;
optional int32 totalTracks = 26;
optional int32 disc = 27;
optional int32 totalDiscs = 28;
optional int32 u11 = 31; //seems to be exclusively 1
optional int32 fileSize = 32; //file size
optional int32 u13 = 37; //seems to be exclusively 0
optional int32 u14 = 38; //seems to be exclusively 0
optional int32 bitrate = 44; //mostly certain
optional string u15 = 53; //seems to be exclusively "-383260437"
optional int32 u16 = 61;
}
message MetadataRequest {
repeated Track tracks = 1;
optional string address = 2; //client MAC
}
message QueuedUpload {
optional string id = 1;
optional int32 u0 = 2; //usually 2 - seems to change when attempting to upload duplicate files
optional string serverId = 3;
}
message Status {
optional int32 u0 = 1;
optional int32 u1 = 2;
optional int32 u2 = 3; //usually 5
optional int32 u3 = 4; //usually 6000
optional int32 u4 = 5;
optional int32 u5 = 6;
}
message TrackResponse {
repeated string ids = 2;
repeated QueuedUpload uploads = 3;
}
message MetadataResponse {
optional int32 u0 = 1; //usually 1
optional TrackResponse response = 2;
optional Status state = 6;
}
message UploadAuth {
optional string address = 1;
optional string hostname = 2;
}
message Quota {
optional int32 maximumTracks = 1;
optional int32 availableTracks = 2;
optional int32 totalTracks = 3;
}
message ClientState {
optional string address = 1;
}
message ClientStateResponse {
optional int32 u0 = 1;
optional Status status = 6;
optional Quota quota = 8;
}
message UploadAuthResponse {
optional int32 u0 = 1;
optional Status status = 6;
optional int32 u1 = 11;
optional int32 u2 = 12;
}