Files
music-agregator/proto/music_agregator/v1/music_agregator.proto
T

164 lines
3.4 KiB
Protocol Buffer

syntax = "proto3";
package music_agregator.v1;
option go_package = "homelab.lan/music-agregator/gen/music_agregator/v1/";
service MusicAgregatorService {
rpc MonitorAlbum(MonitorAlbumRequest) returns (MonitorAlbumResponse) {}
rpc GetArtists(GetArtistsRequest) returns (GetArtistsResponse) {}
rpc GetAlbum(GetAlbumRequest) returns (GetAlbumResponse) {}
rpc AnalyzeAlbumRelease(AnalyzeAlbumReleaseRequest) returns (AnalyzeAlbumReleaseResponse) {}
}
message MonitorAlbumRequest {
string album_id = 1;
IndexerOptions indexer_options = 2;
QualityType quality = 3;
}
message IndexerOptions {
string tracker = 1;
}
enum QualityType {
QUALITY_UNSPECIFIED = 0;
QUALITY_LOSSLESS = 1;
QUALITY_LOSSY = 2;
}
message MonitorAlbumResponse {
AlbumDetail album = 1;
ArtistSummary artist = 2;
MonitoredRelease release = 3;
}
message GetArtistsRequest {}
message GetArtistsResponse {
repeated ArtistSummary artists = 1;
}
enum MonitorState {
MONITOR_STATE_UNSPECIFIED = 0;
MONITOR_STATE_MONITORED = 1;
MONITOR_STATE_UNMONITORED = 2;
MONITOR_STATE_EXCLUDED = 3;
}
message ArtistSummary {
string id = 1;
string external_id = 2;
string name = 3;
string artist_type = 4;
string country = 5;
repeated string genres = 6;
string image_url = 7;
MonitorState monitor_state = 8;
repeated AlbumDetail albums = 9;
}
message AlbumDetail {
string id = 1;
string external_id = 2;
string title = 3;
string album_type = 4;
string release_date = 5;
int32 total_tracks = 6;
int32 total_discs = 7;
string cover_url = 8;
repeated string genres = 9;
string label = 10;
MonitorState monitor_state = 11;
DownloadInfo download = 12;
AlbumReleaseDetail release = 13;
}
message DownloadInfo {
string state = 1;
string format = 2;
string quality = 3;
string save_path = 4;
}
message GetAlbumRequest {
string album_id = 1;
}
message AlbumInfo {
AlbumDetail album = 1;
repeated TrackDetail tracks = 2;
}
message GetAlbumResponse {
AlbumInfo info = 1;
}
message AnalyzeAlbumReleaseRequest {
string album_id = 1;
}
message AnalyzeAlbumReleaseResponse {
AlbumInfo info = 1;
}
message TrackDetail {
string id = 1;
string external_id = 2;
string title = 3;
int32 duration_ms = 4;
int32 disc_number = 5;
int32 track_number = 6;
string isrc = 7;
bool explicit = 8;
repeated ArtistCredit artists = 9;
string file_path = 10;
int64 file_size = 11;
string format = 12;
int32 bit_depth = 13;
int32 sample_rate = 14;
int32 channels = 15;
int32 bitrate_kbps = 16;
}
message ArtistCredit {
string id = 1;
string name = 2;
}
message AlbumReleaseDetail {
string id = 1;
string format = 2;
int32 bit_depth = 3;
int32 sample_rate = 4;
int32 channels = 5;
bool is_lossless = 6;
string source = 7;
int64 total_size = 8;
int32 total_duration_ms = 9;
int32 track_count = 10;
bool has_cover_art = 11;
bool has_cue_sheet = 12;
bool has_rip_log = 13;
string path = 14;
}
message MonitoredRelease {
string info_hash = 1;
string artist = 2;
string album = 3;
int32 year = 4;
string format = 5;
bool lossless = 6;
int32 bit_depth = 7;
int32 sample_rate = 8;
string source = 9;
int32 track_count = 10;
repeated string track_names = 11;
bool has_cover_art = 12;
bool has_cue_sheet = 13;
bool has_rip_log = 14;
int64 total_audio_size = 15;
string download_link = 16;
int32 seeders = 17;
string tracker = 18;
}