From 772637e0947286e54ab97b8d55ad2c05fe9a1c86 Mon Sep 17 00:00:00 2001 From: ComradeCrow Date: Tue, 18 Apr 2023 17:39:43 -0700 Subject: hotfix --- src/YtdlpWrapper.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/YtdlpWrapper.cpp') 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)); } -- cgit 1.4.1-2-gfad0