diff options
author | ComradeCrow <comradecrow@vivaldi.net> | 2023-04-18 17:39:43 -0700 |
---|---|---|
committer | ComradeCrow <comradecrow@vivaldi.net> | 2023-04-18 17:39:43 -0700 |
commit | 772637e0947286e54ab97b8d55ad2c05fe9a1c86 (patch) | |
tree | 2a7d46adf1d2dd7d2b60698e6d0d6daf5bdbd2f8 /src/YtdlpWrapper.cpp | |
parent | 6737e6ac61634781638338b3753385e78aa1d571 (diff) | |
download | ytcpp-772637e0947286e54ab97b8d55ad2c05fe9a1c86.tar.gz |
hotfix
Diffstat (limited to 'src/YtdlpWrapper.cpp')
-rw-r--r-- | src/YtdlpWrapper.cpp | 5 |
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)); } |