From 77ed51898157d99112be7550471ec06e32344c9e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 11 Oct 2020 21:35:37 +0200 Subject: Refactor plugin into seperate pages TODO: Readd 4chan login page, manganelo creators page, autocomplete --- src/plugins/Manga.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/plugins/Manga.cpp') diff --git a/src/plugins/Manga.cpp b/src/plugins/Manga.cpp index 6ad11ab..70a1664 100644 --- a/src/plugins/Manga.cpp +++ b/src/plugins/Manga.cpp @@ -1,7 +1,12 @@ #include "../../plugins/Manga.hpp" +#include "../../include/Program.h" namespace QuickMedia { - const std::vector& Manga::get_creators() const { - return creators; + TrackResult MangaChaptersPage::track(const std::string &str) { + const char *args[] = { "automedia", "add", "html", content_url.data(), "--start-after", str.data(), "--name", content_title.data(), nullptr }; + if(exec_program(args, nullptr, nullptr) == 0) + return TrackResult::OK; + else + return TrackResult::ERR; } } \ No newline at end of file -- cgit v1.2.3