aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-08-15 20:46:59 +0200
committerdec05eba <dec05eba@protonmail.com>2020-08-15 20:53:44 +0200
commitb31bbdf6cf133f16752a7b0f78cbe9ae2fa667e2 (patch)
tree1b2c3a7b7cf02d3f48b64e8fb40f1f4e129592f0 /src/plugins
parent169057193c664f52267b818b2ff8bdcf73f21747 (diff)
Add youtube recommendations based on unwatched related videos
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Mangadex.cpp2
-rw-r--r--src/plugins/Youtube.cpp5
2 files changed, 5 insertions, 2 deletions
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<std::pair<std::string, Json::Value>> 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<BodyItem>(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);