Skip to content

Commit

Permalink
Update Jukebox schema
Browse files Browse the repository at this point in the history
  • Loading branch information
FluxCapacitor2 committed Dec 22, 2023
1 parent e3ef02d commit 6700f14
Showing 1 changed file with 29 additions and 12 deletions.
41 changes: 29 additions & 12 deletions src/main/proto/jukebox.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,38 @@ import "google/protobuf/timestamp.proto";
import "common/common_types.proto";

service Jukebox {
rpc GetSongInfo(SongInfoRequest) returns (PlayerSongInfo);
rpc GetSongInfo(SongInfoRequest) returns (PlayerSongQueue);
rpc PlaySong(PlaySongRequest) returns (PlaySongResponse);
rpc RemoveSong(SongRemoveRequest) returns (google.protobuf.Empty);
rpc StopSong(StopSongRequest) returns (google.protobuf.Empty);
}

message SongInfoRequest {
string player_uuid = 1;
}

message PlayerSongQueue {
bool is_playing = 1;
repeated PlayerSongInfo songs = 2;
}

message PlayerSongInfo {
string player_uuid = 1;
bool is_playing = 2;
optional string song_name = 3;
optional int32 song_progress_ticks = 4;
optional int32 song_length_ticks = 5;
optional bool is_temporary = 6;
optional string song_name = 2;
optional int32 song_progress_ticks = 3;
optional int32 song_length_ticks = 4;
repeated string tags = 5;
}

message PlaySongRequest {
string player_uuid = 1;
/* A path to an nbs file, relative to the Jukebox plugin's config folder on the proxy */
string song_name = 2;
bool override_current_song = 3;
bool continue_current_song_when_done = 4;
bool is_temporary = 5;
int32 start_time_ticks = 6;
/* Use -1 for the end of the queue */
int32 queue_position = 3;
int32 start_time_ticks = 4;
/* A list of strings that identify the song; used to batch remove songs */
repeated string tags = 5;
}

message PlaySongResponse {
Expand All @@ -40,8 +47,18 @@ message PlaySongResponse {
bool started_playing = 3;
}

message SongRemoveRequest {
string player_uuid = 1;
string song_name = 2;
}

message BatchSongRemoveRequest {
string player_uuid = 1;
/* If a song has any of the listed tags, it will be removed from the player's queue */
repeated string match_tags = 2;
}

/* Stops the player's current song, removes it from the queue, and pauses the next song */
message StopSongRequest {
string player_uuid = 1;
bool stop_temporary_music = 2;
bool stop_permanent_music = 3;
}

0 comments on commit 6700f14

Please sign in to comment.