Move torrents to completed after finish
This commit is contained in:
+36
-2
@@ -19,12 +19,21 @@ service Torrents {
|
||||
// from the subscribe point onward — no history is replayed. New subscribers
|
||||
// only see events that fire after they connect.
|
||||
rpc Notifications(NotificationsRequest) returns (stream Notification);
|
||||
|
||||
// List the files inside a torrent with their download progress. Returns
|
||||
// NOT_FOUND if the torrent is unknown or its metadata has not resolved yet
|
||||
// (e.g. a magnet link still fetching peers).
|
||||
rpc Files(FilesRequest) returns (FilesResponse);
|
||||
}
|
||||
|
||||
message AddRequest {
|
||||
string magnet = 1;
|
||||
// Optional output directory override. Empty means use torad's default.
|
||||
string output_dir = 2;
|
||||
// Folder to download into. Empty = daemon default
|
||||
// (<download_dir>/<torrent_name>/ for multi-file torrents).
|
||||
string download_folder = 2;
|
||||
// Folder to move the torrent into after completion. Empty = daemon default
|
||||
// (<download_dir>/completed/<torrent_name>/).
|
||||
string move_after_completion_folder = 3;
|
||||
}
|
||||
|
||||
message AddResponse {
|
||||
@@ -69,6 +78,31 @@ message NotificationsRequest {
|
||||
repeated NotificationKind kinds = 2;
|
||||
}
|
||||
|
||||
message FilesRequest {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
enum FileState {
|
||||
FILE_STATE_UNSPECIFIED = 0;
|
||||
// File is partially downloaded.
|
||||
IN_PROGRESS = 1;
|
||||
// File's full byte range has been verified.
|
||||
READY = 2;
|
||||
}
|
||||
|
||||
message TorrentFile {
|
||||
// Path relative to the torrent root, as declared in the .torrent metadata.
|
||||
// May contain forward slashes for multi-file torrents.
|
||||
string name = 1;
|
||||
uint64 length = 2;
|
||||
uint64 downloaded_bytes = 3;
|
||||
FileState state = 4;
|
||||
}
|
||||
|
||||
message FilesResponse {
|
||||
repeated TorrentFile files = 1;
|
||||
}
|
||||
|
||||
message Notification {
|
||||
// Wall-clock time the daemon observed the change, in milliseconds since the
|
||||
// Unix epoch.
|
||||
|
||||
Reference in New Issue
Block a user