From cf7036c7f7dff99be19c2c15e6051c4704287574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20=C3=96hrstr=C3=B6m?= Date: Tue, 30 Jul 2024 17:56:27 +0200 Subject: [PATCH] add get-id command to cli --- cli/Session.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli/Session.cpp b/cli/Session.cpp index bf23cbc5..d9239899 100644 --- a/cli/Session.cpp +++ b/cli/Session.cpp @@ -130,6 +130,10 @@ namespace cli make_function([this](const Path &path) -> void { Get(path); })); AddCommand("get", " downloads file to ", make_function([this](const Path &path, const LocalPath &dst) -> void { Get(dst, path); })); + AddCommand("get-id", " get object by id", + make_function([this](mtp::u32 id) -> void { Get(mtp::ObjectId(id)); })); + AddCommand("get-id", " get object by id to ", + make_function([this](mtp::u32 id, const LocalPath &dst) -> void { Get(dst, mtp::ObjectId(id)); })); AddCommand("get-thumb", " downloads thumbnail for file", make_function([this](const Path &path) -> void { GetThumb(path); }));