aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Fourchan.cpp4
-rw-r--r--src/plugins/Page.cpp4
-rw-r--r--src/plugins/Soundcloud.cpp6
-rw-r--r--src/plugins/Youtube.cpp2
4 files changed, 9 insertions, 7 deletions
diff --git a/src/plugins/Fourchan.cpp b/src/plugins/Fourchan.cpp
index d2f81a9..52024e1 100644
--- a/src/plugins/Fourchan.cpp
+++ b/src/plugins/Fourchan.cpp
@@ -167,7 +167,7 @@ namespace QuickMedia {
}
PluginResult FourchanBoardsPage::submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) {
- result_tabs.push_back(Tab{create_body(false), std::make_unique<FourchanThreadListPage>(program, title, url), create_search_bar("Search...", SEARCH_DELAY_FILTER)});
+ result_tabs.push_back(Tab{create_body(false, true), std::make_unique<FourchanThreadListPage>(program, title, url), create_search_bar("Search...", SEARCH_DELAY_FILTER)});
return PluginResult::OK;
}
@@ -262,6 +262,8 @@ namespace QuickMedia {
if(author.isString())
author_str = author.asString();
+ author_str += " #" + std::to_string(post_num.asInt64());
+
std::string comment_text;
extract_comment_pieces(sub_begin, sub_end - sub_begin,
[&comment_text](const CommentPiece &cp) {
diff --git a/src/plugins/Page.cpp b/src/plugins/Page.cpp
index 9eb874f..8605d82 100644
--- a/src/plugins/Page.cpp
+++ b/src/plugins/Page.cpp
@@ -29,8 +29,8 @@ namespace QuickMedia {
return DownloadResult::OK;
}
- std::unique_ptr<Body> Page::create_body(bool plain_text_list) {
- return program->create_body(plain_text_list);
+ std::unique_ptr<Body> Page::create_body(bool plain_text_list, bool prefer_card_view) {
+ return program->create_body(plain_text_list, prefer_card_view);
}
std::unique_ptr<SearchBar> Page::create_search_bar(const std::string &placeholder_text, int search_delay) {
diff --git a/src/plugins/Soundcloud.cpp b/src/plugins/Soundcloud.cpp
index 9c2d5f4..f4d01b6 100644
--- a/src/plugins/Soundcloud.cpp
+++ b/src/plugins/Soundcloud.cpp
@@ -253,7 +253,7 @@ namespace QuickMedia {
if(url == "track") {
SoundcloudPlaylist *playlist = static_cast<SoundcloudPlaylist*>(submit_body_item->extra.get());
- auto body = create_body();
+ auto body = create_body(false, true);
body->items = playlist->tracks;
result_tabs.push_back(Tab{std::move(body), std::make_unique<SoundcloudPlaylistPage>(program, playlist, title), nullptr});
} else if(url.find("/stream/users/") != std::string::npos) {
@@ -263,7 +263,7 @@ namespace QuickMedia {
DownloadResult result = download_json(json_root, query_url, {}, true);
if(result != DownloadResult::OK) return download_result_to_plugin_result(result);
- auto body = create_body();
+ auto body = create_body(false, true);
std::string next_href;
PluginResult pr = parse_user_page(json_root, body->items, next_href);
if(pr != PluginResult::OK) return pr;
@@ -283,7 +283,7 @@ namespace QuickMedia {
if(!url_json.isString())
return PluginResult::ERR;
- result_tabs.push_back(Tab{create_body(), std::make_unique<SoundcloudAudioPage>(program, url_json.asString()), nullptr});
+ result_tabs.push_back(Tab{nullptr, std::make_unique<SoundcloudAudioPage>(program, url_json.asString()), nullptr});
}
return PluginResult::OK;
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index f7b36d6..9b7c5ba 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -648,7 +648,7 @@ namespace QuickMedia {
if(strncmp(url.c_str(), "https://www.youtube.com/channel/", 32) == 0) {
// TODO: Make all pages (for all services) lazy fetch in a similar manner!
- result_tabs.push_back(Tab{create_body(), std::make_unique<YoutubeChannelPage>(program, url, "", title), create_search_bar("Search...", 350)});
+ result_tabs.push_back(Tab{create_body(false, true), std::make_unique<YoutubeChannelPage>(program, url, "", title), create_search_bar("Search...", 350)});
} else {
result_tabs.push_back(Tab{nullptr, std::make_unique<YoutubeVideoPage>(program, url), nullptr});
}