about summary refs log tree commit diff stats
path: root/src/YtdlpWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/YtdlpWrapper.cpp')
-rw-r--r--src/YtdlpWrapper.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/YtdlpWrapper.cpp b/src/YtdlpWrapper.cpp
index ca1d4a4..2b87a62 100644
--- a/src/YtdlpWrapper.cpp
+++ b/src/YtdlpWrapper.cpp
@@ -24,10 +24,9 @@ py::object YtdlpWrapper::get_ytdl() {
     return ytdl;
 }
 
-json YtdlpWrapper::getJsonSearch(const string& searchTerm) {
+json YtdlpWrapper::getJsonSearch(const string& searchTerm, int limit) {
 
-    // py::object info = get_ytdl().attr("extract_info")("ytsearch:"+searchTerm, "download"_a=py::bool_(false));
-    py::dict info("test"_a=py::bool_(true), "test2"_a=py::str("yoyoyo"), "test3"_a=py::none());
+    py::dict info = get_ytdl().attr("extract_info")("ytsearch"+std::to_string(limit)+":"+searchTerm, "download"_a=py::bool_(false));
     return json::parse(pyDictToJsonString(info));
 }