feat!: playlists
This commit is contained in:
@@ -6,6 +6,11 @@ package library;
|
||||
|
||||
service Library {
|
||||
rpc ListTracks(google.protobuf.Empty) returns (TrackList);
|
||||
rpc ListPlaylists(google.protobuf.Empty) returns (ListPlaylistsResponse);
|
||||
rpc CreatePlaylist(CreatePlaylistRequest) returns (CreatePlaylistResponse);
|
||||
rpc DeletePlaylist(DeletePlaylistRequest) returns (google.protobuf.Empty);
|
||||
rpc AddTrackToPlaylist(AddTrackToPlaylistRequest) returns (google.protobuf.Empty);
|
||||
rpc RemoveTrackFromPlaylist(RemoveTrackFromPlaylistRequest) returns (google.protobuf.Empty);
|
||||
}
|
||||
|
||||
message TrackList {
|
||||
@@ -19,3 +24,35 @@ message Track {
|
||||
uint64 artist_id = 4;
|
||||
uint64 duration = 5;
|
||||
}
|
||||
|
||||
message Playlist {
|
||||
uint32 id = 1;
|
||||
string name = 2;
|
||||
repeated Track tracks = 3;
|
||||
}
|
||||
|
||||
message ListPlaylistsResponse {
|
||||
repeated Playlist playlists = 1;
|
||||
}
|
||||
|
||||
message CreatePlaylistRequest {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message CreatePlaylistResponse {
|
||||
Playlist playlist = 1;
|
||||
}
|
||||
|
||||
message DeletePlaylistRequest {
|
||||
uint32 id = 1;
|
||||
}
|
||||
|
||||
message AddTrackToPlaylistRequest {
|
||||
uint32 playlist_id = 1;
|
||||
string track_hash = 2;
|
||||
}
|
||||
|
||||
message RemoveTrackFromPlaylistRequest {
|
||||
uint32 playlist_id = 1;
|
||||
uint32 track_rank = 2;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ service Player {
|
||||
rpc SetVolume(SetVolumeRequest) returns (SetVolumeResponse);
|
||||
rpc PlayTrackNext(TrackRequest) returns (Queue);
|
||||
rpc AddTrackToQueue(TrackRequest) returns (Queue);
|
||||
rpc AddTracksToQueue(TracksRequest) returns (Queue);
|
||||
rpc PlayPlaylist(PlayPlaylistRequest) returns (PlayerStatus);
|
||||
rpc SwapQueueIndices(SwapQueueIndicesRequest) returns (Queue);
|
||||
rpc SkipTrack(google.protobuf.Empty) returns (PlayerStatus);
|
||||
rpc SkipToQueueIndex(SkipToQueueIndexRequest) returns (PlayerStatus);
|
||||
@@ -69,3 +71,11 @@ message SwapQueueIndicesRequest {
|
||||
uint32 a = 1;
|
||||
uint32 b = 2;
|
||||
}
|
||||
|
||||
message TracksRequest {
|
||||
repeated string tracks = 1;
|
||||
}
|
||||
|
||||
message PlayPlaylistRequest {
|
||||
uint32 id = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user