From b31bbdf6cf133f16752a7b0f78cbe9ae2fa667e2 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 15 Aug 2020 20:46:59 +0200 Subject: Add youtube recommendations based on unwatched related videos --- src/plugins/Mangadex.cpp | 2 ++ src/plugins/Youtube.cpp | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/Mangadex.cpp b/src/plugins/Mangadex.cpp index d2dee13..78c8ec9 100644 --- a/src/plugins/Mangadex.cpp +++ b/src/plugins/Mangadex.cpp @@ -61,6 +61,7 @@ namespace QuickMedia { return SearchResult::ERR; std::vector> chapters(chapter_json.size()); + /* TODO: Optimize member access */ for(auto &member_name : chapter_json.getMemberNames()) { Json::Value chapter = chapter_json[member_name]; if(chapter.isObject()) @@ -81,6 +82,7 @@ namespace QuickMedia { time_t time_now = time(NULL); + /* TODO: Pointer */ std::string prev_chapter_number; for(auto it = chapters.begin(); it != chapters.end(); ++it) { const std::string &chapter_id = it->first; diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp index b50939e..6f21991 100644 --- a/src/plugins/Youtube.cpp +++ b/src/plugins/Youtube.cpp @@ -62,10 +62,11 @@ namespace QuickMedia { auto body_item = std::make_unique(title); /* TODO: Make date a different color */ - if(date) { + /* TODO: Do not append to title, messes up history.. */ + /*if(date) { body_item->title += '\n'; body_item->title += date; - } + }*/ body_item->url = "https://www.youtube.com/watch?v=" + video_id_str; body_item->thumbnail_url = std::move(thumbnail_url); added_videos.insert(video_id_str); -- cgit v1.2.3