Added add endpoint

This commit is contained in:
Alexander
2026-05-07 10:27:20 +02:00
parent 6071bc7980
commit 97a57c10fd
5 changed files with 344 additions and 39 deletions
@@ -4,6 +4,7 @@ option go_package = "homelab.lan/music-agregator/gen/music_agregator/v1/torrent"
service TorrentService {
rpc List(ListRequest) returns (ListResponse) {}
rpc Add(AddRequest) returns (AddResponse) {}
}
message ListRequest {
@@ -45,4 +46,27 @@ message ListItem {
int64 seeding_time = 21;
int64 amount_left = 22;
double availability = 23;
string size_formatted = 100;
string progress_formatted = 101;
string dlspeed_formatted = 102;
string upspeed_formatted = 103;
string added_on_formatted = 104;
string completion_on_formatted = 105;
string downloaded_formatted = 106;
string uploaded_formatted = 107;
string amount_left_formatted = 108;
string availability_formatted = 109;
string eta_formatted = 110;
}
message AddRequest {
string download_url = 1;
string filename = 2;
bytes torrent_data = 3;
string save_path = 4;
}
message AddResponse {
ListItem item = 1;
}